473,382 Members | 1,749 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

event handling error

Hi all,
I have a drop down in an asp.net form defined as below:

<asp:DropDownList id="dropDownLeaseType" runat="server"
OnSelectedIndexChanged="LeaseTypeChanged"></asp:DropDownList>

I have declared a javascript function as below:
<SCRIPT type="text/javascript">
function LeaseTypeChanged() {
WebComboWinningStructure.SelectedIndex =
WebComboLeaseType.SelectedIndex;
}
</SCRIPT>

The browser displays following error:
CS0117: Page does not contain the definition for LeaseTypeChanged.

Any help will be appreciated.

Thanks.
Nov 18 '05 #1
3 1106
"OnSelectedIndexChanged" is a server-side event, which requires a
server-side event handler. "onchange" is the client-side event.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Nikhil Patel" <do*******@nospaml.com> wrote in message
news:up**************@TK2MSFTNGP14.phx.gbl...
Hi all,
I have a drop down in an asp.net form defined as below:

<asp:DropDownList id="dropDownLeaseType" runat="server"
OnSelectedIndexChanged="LeaseTypeChanged"></asp:DropDownList>

I have declared a javascript function as below:
<SCRIPT type="text/javascript">
function LeaseTypeChanged() {
WebComboWinningStructure.SelectedIndex =
WebComboLeaseType.SelectedIndex;
}
</SCRIPT>

The browser displays following error:
CS0117: Page does not contain the definition for LeaseTypeChanged.

Any help will be appreciated.

Thanks.

Nov 18 '05 #2
Thanks Kevin.
I changed it to onChange. Now I don't get any error but the event does
not fire.

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
"OnSelectedIndexChanged" is a server-side event, which requires a
server-side event handler. "onchange" is the client-side event.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Nikhil Patel" <do*******@nospaml.com> wrote in message
news:up**************@TK2MSFTNGP14.phx.gbl...
Hi all,
I have a drop down in an asp.net form defined as below:

<asp:DropDownList id="dropDownLeaseType" runat="server"
OnSelectedIndexChanged="LeaseTypeChanged"></asp:DropDownList>

I have declared a javascript function as below:
<SCRIPT type="text/javascript">
function LeaseTypeChanged() {
WebComboWinningStructure.SelectedIndex =
WebComboLeaseType.SelectedIndex;
}
</SCRIPT>

The browser displays following error:
CS0117: Page does not contain the definition for LeaseTypeChanged.

Any help will be appreciated.

Thanks.


Nov 18 '05 #3
Can you post the code now that you've revised it? Also, be aware of case
issues with JavaScript.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Nikhil Patel" <do*******@nospaml.com> wrote in message
news:uu**************@TK2MSFTNGP15.phx.gbl...
Thanks Kevin.
I changed it to onChange. Now I don't get any error but the event does
not fire.

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
"OnSelectedIndexChanged" is a server-side event, which requires a
server-side event handler. "onchange" is the client-side event.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Nikhil Patel" <do*******@nospaml.com> wrote in message
news:up**************@TK2MSFTNGP14.phx.gbl...
Hi all,
I have a drop down in an asp.net form defined as below:

<asp:DropDownList id="dropDownLeaseType" runat="server"
OnSelectedIndexChanged="LeaseTypeChanged"></asp:DropDownList>

I have declared a javascript function as below:
<SCRIPT type="text/javascript">
function LeaseTypeChanged() {
WebComboWinningStructure.SelectedIndex =
WebComboLeaseType.SelectedIndex;
}
</SCRIPT>

The browser displays following error:
CS0117: Page does not contain the definition for LeaseTypeChanged.

Any help will be appreciated.

Thanks.



Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Covad | last post by:
Hi all, For some reason my change() function is only called when the page loads. I'd much rather it gets called when the select changes. Here's the code: window.onload = init; function...
4
by: Eric | last post by:
How can I dynamically assign an event to an element? I have tried : (myelement is a text input) document.getElementById('myelement').onKeyUp = "myfnc(param1,param2,param3)"; ...
18
by: Christopher W. Douglas | last post by:
I am writing a VB.NET application in Visual Studio 2003. I have written a method that handles several events, such as closing a form and changing the visible status of a form. I have some code...
2
by: Julia Baresch | last post by:
Hi everyone, As some of you may know, we've been having trouble with an unrecognized database format error. Today I installed an unfinished project on the workstation of one of my users. ...
3
by: Steve Long | last post by:
Hello, I have a VB.NET class that raises a MapSet event that passes an argument of type interop.MapObjects2.MapClass. I have a C# class that inherits from this VB.NET class. How can I handle the...
18
by: Elder Hyde | last post by:
Hey all, A class of mine needs to tell the outside world when its buffer is not empty. The problem is that C# seems to force you to put the event-raising code in the base class. To illustrate,...
3
by: geskerrett | last post by:
We have been asked to develop and application for a client that is a 'notification" system. We would like to use python, but are struggling to find the right starting point. Any suggestions, tips...
2
by: Ralph | last post by:
Hi I don't understand why it's not working: function schedule(imTop){ this.tdImagesTop = imTop; } schedule.prototype.selectEl = function() { alert(this.tdImagesTop);
4
by: =?Utf-8?B?bXIgcGVhbnV0?= | last post by:
Usually when a method is executing and an event occurs the event handler executes then the thread is returned to the original method. I have a case where I want my event handler to cancel...
5
by: Klaudiusz Bryja | last post by:
Hi, This is for NetCF 2.0. I need to create event handling code which using reflection. I have some parameters in XML which describe how event should be handled. I have code to create...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.