Click here to Skip to main content
15,669,524 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a databound Dropdownlist, which the data is filtered based on the active user,
I wanted to place an initial value before the items are displayed at the dropdown

in order for the initial value to be displayed,

I have set AppendDataBoundItems = true;

It is now displaying the initial value, the problem is, when I change the user, the values inside the dropdown list retains its previous values and add new values from the new selection.

Is there any other way to include an "INITIAL VALUE" like choose or select on a databound dropdown list?
Posted

1 solution

call Dropdownlist.Items.Clear(); before you bind again
 
Share this answer
 
Comments
JB0301 13-May-14 4:30am    
Gee thanks!

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