Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How i can fill data in dropdownlist ?

I have two tables: 1. table for employee. 2. table for country (lockup table)

I need fill data in dropdwonlist and that the indicator is on the same selection employee To Update.


C#
DataTable _T2 = ins._Get_Country();
            DL_Nationality.DataSource = _T2;
            DL_Nationality.DataTextField = "CouDescription";
            DL_Nationality.DataValueField = "CountryID";
            DL_Nationality.DataBind();
Posted
Comments
Manoj Sawant 15-Jun-15 2:33am    
plz specify your problem in detail..
Torakami 15-Jun-15 3:04am    
Please elaborate your problem .
Member 11411753 15-Jun-15 3:37am    
i want choice SELECTEDVALUE = ????
EX:
Country: KSA, Jordan, USA.
PesonalInfo : Tony, 28, Jordan.

I want retrieve data in his page for make update.
In country dropDownList should be SELECTEDVALUE = Jordan ,,, HOW?
Member 11411753 15-Jun-15 3:38am    
<asp:DropDownList ID="DL_Nationality" runat="server">
Harpreet Singh 15-Jun-15 6:39am    
detials you have given is not appropriate

1 solution

Have a read of this DropDownList article:
DropDownList[^]

Read the "How to" links, select the relevant framework/version when redirected.

That should get you up to speed on how to use a DropDownList.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900