Administrator Admin
Number of posts : 160 Age : 38 Location : Lucknow Job/hobbies : Software Engeener What U like To do ? : Because Its Rock with me. Registration date : 2008-01-06
| Subject: Drop Down List 3/1/2008, 10:09 pm | |
| Drop down list , In Drop down List you first have to add the Number of Elements in the list and this can be added in the list as follows - Quote :
<asp:DropDownList ID="DD_SecreteQuestion" runat="server"> <asp:ListItem Text ="SELECT THE SECRETE QUESTION" Value ="0">asp:ListItem> <asp:ListItem Text ="What Is you Mother Name ?" value="1">asp:ListItem> <asp:ListItem Text = "What Is your Nick Name ?" Value ="2">asp:ListItem> <asp:ListItem Text ="who Is your ChildHood Hero ?" value ="3">asp:ListItem> <asp:ListItem Text ="Who Is your Favorate Actoress ?" Value="4">asp:ListItem> asp:DropDownList>td>
Code for C# - Quote :
- Lb_Display.text = DD_SecreteQuestion.SelectedItem.Value gives you the value like 1,2,3 as deffined above
and Lb_Display.text = DD_SecreteQuestion.SelectedItem.Text will give you the value of the text
| |
|