Suppose you have a employee table with colums
Your requirement is....
In the page load you want to show the names in the dropdownlist and when selecting a name all the details of that employee should be listed in the listitem...
<asp:DropDownList ID="ddl1" runat="server" AutoPostBack="true"
in the page load
protected void Page_Load(object sender, EventArgs e)
Retreive the result set in DataSet ds;
//assume that you know how to get the resultset of a table in the dataset using ado.net
//Query -"SELECT * from employee"
DataSet ds =The ResultSet of your query;
ddl1.DataSource = ds;
ddl1.DataTextField = "Name";
ddl1.DataValueField = "EmpID";
//So in this way you can show the names in the dropdownlist
}Akiii, if this helps please login to Mark As Answer. | Alert Moderator