|
-
Aug 1st, 2002, 10:38 AM
#1
Thread Starter
New Member
Setting the Drop-down listbox Default value
ok, this seems like it should be an easy enough task...
I want to be able to set which item is selected in a Drop-down listbox based upon a database query.... This is on an .aspx.vb page.
DDL_Choice1.SelectedItem.Text = "whatever value"
- this doesn't work because it over-writes the first value in the list with the value specified.
DDL_Choice1.Items("whatever value").Selected = True
-this doesn't work either because "whatever value" MUST be the index of the item you want selected, which I don't know because the items in the dropdown list are dymanically created as well.
there has to be a simple way to specify which VALUE is selected (in the VB code-behind-page)...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|