locList.DataSource = ds; locList.DataTextField = Property.NameColumn; locList.DataValueField = Property.IdColumn; locList.DataBind();
locList.DataSource = ds.Tables[0];//assign table not dataset locList.DataTextField = Property.NameColumn;//make sure you have write column names properly locList.DataValueField = Property.IdColumn; locList.DataBind();
if (!IsPostBack) { locList.DataSource = ds.Tables[0]; locList.DataTextField = Property.NameColumn; locList.DataValueField = Property.IdColumn; locList.DataBind(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)