Wednesday, January 26, 2011
DropDownList - Set selected value
11:02 PM |
Posted by
Sheen |
Edit Post
The following code snippent shows how to set the selected item of a
DropdownList
DropDownList1.ClearSelection();
ListItem li = DropDownList1.Items.FindByValue("20");
DropDownList1.Items.FindByText(li.Text).Selected = true;
I have seen many beginners are struggling to set the selected value dynamically,
Hope this is very helpful.
Subscribe to:
Post Comments (Atom)
Blog Archive
Important Blogs
-
-
Git Workflow For Enterprise development6 years ago
-
-
Watch Live Cricket Online Free14 years ago
-
-
-
0 comments:
Post a Comment