Hello,
Ok, let's say you have a dropdown list named
ddl. All you need is a DataSet
ds and specify what column would be for a text and what for a value:
if (!DataHelper.DataSourceIsEmpty(ds))
{
ddl.DataSource = ds.Tables[0].DefaultView;
ddl.DataTextField = "column1";
ddl.DataValueField = "column2";
ddl.DataBind();
}
Best regards,
Jan Hermann