Click here to Skip to main content
16,011,542 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a DropDownList control in my Asp.net page.

<asp:DropDownList ID="DDUserList" CausesValidation="true"  
									 OnTextChanged="DropDownChange" runat="server" CssClass="DropDown" AppendDataBoundItems="True" />


The List is Load it in the control but when I.m trying to Select one Item then there no any event to cache it.

Is any solution to this issue?

What I have tried:

Finally I saw an event raise.
And that is the
DDUserList.SelectedIndexChanged

But NOT when I need it. It raise when I made a new selection in the control and trying to leave that Panel and go somewhere else; in the same page.
Then the event raises.
But that is not what I want.
Problem remains.
Posted
Updated 9-Dec-18 20:13pm
v2

I think the issue is solved.
But I don't know if that is the right one.
I add the AutoPostBack="True" in my as.net area and the event raises.
If that is the right solution please answer.
Thank you
 
Share this answer
 
Comments
PRAKASH9 10-Dec-18 1:04am    
for calling SelectedIndexChanged event of DropDownList in Asp.net You must have to set AutoPostBack property to 'True'
The SelectedIndexChanged event will only fire once you set AutoPostback to True. It's false by default.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900