473,386 Members | 2,129 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,386 software developers and data experts.

DropDownList events not firing

Hi there,
I have a web form with some DropDownList controls that I am
trying to trap the selection change and run the attached server code.
However, even thought the controls have the runat property set to server,
the event code does not get executed. Anyone have any ideas?
Jun 27 '08 #1
4 1445
Can you post some code ? Make sure that AutoPostBack property of
DropDownList is set to True.

--
Madhur

"Waldy" <so*****@microsoft.comwrote in message
news:OY**************@TK2MSFTNGP02.phx.gbl...
Hi there,
I have a web form with some DropDownList controls that I am
trying to trap the selection change and run the attached server code.
However, even thought the controls have the runat property set to server,
the event code does not get executed. Anyone have any ideas?
Jun 27 '08 #2

"Madhur" <sd*@df.comwrote in message
news:68**********************************@microsof t.com...
Can you post some code ?
Not easily as it is a large project.
>Make sure that AutoPostBack property of DropDownList is set to True.
I tried that, and now the form gets posted back when a selection is made,
but the dropdown events code still does not get executed.
Jun 27 '08 #3
Please be more specific

The two comments you made contradict each other. When you make a selection,
the Dropdownlist OnselectedChanged event is the event that's firing, to
cause the postback.

What (exactly) are you referring to when you say "dropdown events code"

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
"Waldy" <so*****@microsoft.comwrote in message
news:Oj**************@TK2MSFTNGP02.phx.gbl...
>
"Madhur" <sd*@df.comwrote in message
news:68**********************************@microsof t.com...
>Can you post some code ?

Not easily as it is a large project.
>>Make sure that AutoPostBack property of DropDownList is set to True.

I tried that, and now the form gets posted back when a selection is made,
but the dropdown events code still does not get executed.

Jun 27 '08 #4
Hi David,
The two comments you made contradict each other. When you make a
selection, the Dropdownlist OnselectedChanged event is the event that's
firing, to cause the postback.
The page is re-loaded.
What (exactly) are you referring to when you say "dropdown events code"
The OnSelectedIndexChanged code in the code behind file.
Jun 27 '08 #5

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

Similar topics

2
by: Frank Rocco | last post by:
Hello, I have a DropDownList that I populate from an odbc datasource in code. When I bring up the form for editing, how do I select the value in the DropDownList based on a value stored in the...
3
by: Lew Barnesson | last post by:
Hi All, I have looked and looked for an answer to the following problem (without success), and would be very grateful for a solution. The problem: The SelectedIndexChanged event code of an...
5
by: bryanp10 | last post by:
I have a page that is almost entirely dynamically created. Textboxes and checkbox are working fine, firing events, and persistent their state. DropDownList is giving me a major headache. All...
1
by: Paul L | last post by:
Hi, I have an issue with the OnSelectedIndexChanged event not firing for a DropDownList control which is in the ItemTemplate of a DataList. I have made an exact copy of the DropDownList control,...
1
by: CurlyFro | last post by:
i have a userControl (.ascx) that has a dropdownlist embedded in a datagrid. the dropdownlist autopostback is set to true. why isn't the selectedIndexChanged firing? Private Sub...
2
by: AdrEsqu | last post by:
I am trying to use AutoPostback to retrieve the value that was selected in my dropdownlist. The event is not firing for the dropdownlist because the datagrid is being built after the Lifecycle...
11
by: Santosh | last post by:
Dear all , i am writting following code. if(Page.IsPostBack==false) { try { BindSectionDropDownlist();
2
by: jnoody | last post by:
The problem I am having is with the SelectedIndexChanged event not always firing or the SelectedIndex property not being correct when the event does fire. The code is below, but here are some...
2
by: MattB | last post by:
I have a (.Net 1.1) form with a Repeater and a DropDownList in the ItemTemplate. I programmatically make the DDL Autopostback = true at runtime based on the bound data. That works - I can see the...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.