Click here to Skip to main content
14,447,769 members
Rate this:
Please Sign up or sign in to vote.
See more:
My dropdownlist is
<asp:DropDownList ID="ddl1Board" runat="server" ValidationGroup="StdAdm">
                                                           <asp:ListItem Selected="True">CBSE</asp:ListItem>

My dropdownlist value save in database. but i retrieve the database value then i not understand how to select the dropdownlist value selected.
for example:-
I save the bseb in database and retrieve the bseb in database then i want to user see to bseb is selected.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

If you are saving the Item text then you can retrieve selected item as
DropDownList1.SelectedValue= ValuefromDatabase;

If you are using Index.
DropDownList1.SelectedIndex=2(In this case);
Rakesh From Patna 12-Apr-11 4:41am
m@dhu 12-Apr-11 4:56am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100