hi,
i have set it to auto postback.. here m able to place the item in the dropdownlist from the database during update event.my problem is here i want to select the dropdownlist each time if i don select it throws an error.. but i want it to update even if i don select the item in dropdownlist. please help me with this.
thank you.
Please post your code for populating (adding items to) your DropDownList.
I'm not sure if you're trying to programatically set the selected value, or if you are talking about letting the user select a value.
Are you trying to remember the value that the user selected?
Then after adding new values, resetting the selected value?
I still don't understand what you are trying to do.
To set the selected item programatically:
-
'If you only know the value that should be selected:
-
myDropDownList.Items.FindByValue("the value that should be selected").Selected = True
-
'If you know the index that should be selected:
-
myDropDownList.Items(0).Selected = True
-
'....
-
You should probably also post the code for your AutoPostBack event (the Selected Index Changed event)
-Frinny