Hi,
Error+ Both DataSource and DataSourceID are defined on 'cboIndentNo'. Remove one definition.?
DataTable dtIngre = new DataTable();
dtIngre = objWebImp.GetIngredients(Convert.ToInt32(value));
I get the Data and showing in Data Table Visuvalizer
Field Name is like this:
Ingredient ItemId Qty Units
Bajra 12 222 kgs
Rice 13 221 kgs
SqlDataSource ds1 = new SqlDataSource();
cboIndentNo.DataSource = dtIngre;
cboIndentNo.DataTextField = "Ingredient";
cboIndentNo.DataValueField = "ItemId";
cboIndentNo.DataBind();
Nilanka DharmadasaPosted Nov 16, 2009, 5:28 AM
Try this.
In Page_Load event, set this.
cboIndentNo.DataSourceID = String.Empty
If you find this useful, do not forget this answer as accepted.