ds=sql.getds(
"select top 20 candidateid,name from candidates"
);
ComboBox1.DataTextField =
"name"
;
ComboBox1.DataValueField =
"candidateid"
ComboBox1.DataSource = ds.Tables[0];
ComboBox1.DataBind();
<asp:ToolkitScriptManager ID=
"ToolkitScriptManager1"
runat=
"server"
></asp:ToolkitScriptManager>
<asp:ComboBox ID=
"ComboBox1"
DropDownStyle=
"DropDown"
></asp:ComboBox>