Hi,
I need some help in creating a dataset that I can bind to a datalist after it has added a set of strings to it:
I need some help in creating a dataset that I can bind to a datalist after it has added a set of strings to it:
Code:
DataSet ds = new DataSet(); DataTable dt = new DataTable("table"); ds.Tables.Add(dt); dt.Columns.Add("id"); dt.Columns.Add("description"); dt.Columns.Add("price"); for (int i = 0; i < Data.Count; i++) { string id = sourceofdata[i].id //Here is the main problem ** needs to be a cell item string description = sourceofdata[i].description } DataList1.Datasource = ds; DataList1.DataBind();
Comment