Click here to Skip to main content
15,913,685 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have two dropdown list that is dropdown 1 & 2 but when select Fresher Keyword from dropdown 1 then i want to visible false dropdown list 2 so plz help me.....
Posted
Updated 24-May-12 21:51pm
v2
Comments
Prasad_Kulkarni 25-May-12 3:48am    
can you provide some code snippet?
I guess it might be because you din't made autopostback = true

1 solution

You need to define 'SelectedIndexChanged' event and do your action there. You can set AutoPostback="true" for easy/direct implementation of it.
Sample:
.aspx file:
HTML
<asp:DropDownList id="dropDownList1"
            OnSelectedIndexChanged="SelectedIndex_Changed"
            AutoPostBack="true"
            runat="server"/>

.cs file:
C#
void SelectedIndex_Changed(Object sender, EventArgs e) 
{
   dropDown2.Visible = false;
}


Detail here: MSDN: ListControl.SelectedIndexChanged Event[^]
 
Share this answer
 
Comments
Maciej Los 25-May-12 4:21am    
Good answer, my 5!
Sandeep Mewara 25-May-12 15:27pm    
Thanks.
Arunprasath Natarajan 25-May-12 4:50am    
Nice one it will work
Sandeep Mewara 25-May-12 15:27pm    
Thanks
VJ Reddy 25-May-12 6:27am    
Nice answer and reference 5!

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