0

hello all i have two drop down list in form and binding it on form load event

problem is when i run the application it shows the first value in dropdownlists index no 0
insted of that i want to show blank on run and on click of dropdown it shows values means i want 0 index of drop down list Blank

there is in windows aaplication funda like ddl.selectedindex=-1 works but in case of web application it does not work

please help faster
and thanks in advance

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by azarudeenmca
1

Hey dude- bind your dropdown as normal way. then just add below line and it will work for you.

drp_Country.Items.Insert(0, new ListItem("Please Select Country", "-1"));

try by this and let us know..

hello all i have two drop down list in form and binding it on form load event

problem is when i run the application it shows the first value in dropdownlists index no 0
insted of that i want to show blank on run and on click of dropdown it shows values means i want 0 index of drop down list Blank

there is in windows aaplication funda like ddl.selectedindex=-1 works but in case of web application it does not work

please help faster
and thanks in advance

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.