Click here to Skip to main content
16,022,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
dropdown.seletedvalue.text=CT.getValidStrong(dt.Rows[0]["name"].ToString()).ToString();
Posted

1 solution

hi friend,

if u want the data from dataset's table to dropdown then use this code snippet...

C#
dropdownlistid.DataSource = ds.Tables[0];
dropdownlistid.DisplayMember = "Your Display Column Name from Data Table";
dropdownlistid.ValueMember= "Your Value Column Name from DataTable";
dropdownlistid.DataBind();
 
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