PDA

Click to See Complete Forum and Search --> : Dropdownlist items autopostback


john83
May 13th, 2005, 09:17 PM
i would like my drop down list to retain the selected item when postback
cos everytime it postback, it goes back to the first item, any idea?

wild_bill
May 14th, 2005, 09:30 PM
What code do you have in your page_load event?

john83
May 14th, 2005, 11:11 PM
if Not page.ispostback then
ddl.datasource = ds.categories
.....
ddl.databind()
end if

mendhak
May 15th, 2005, 02:11 AM
Set its EnableViewState property to true.