#region Binding type (commodity type, warehouse name)
public void Datatype_bind (int _peoid)
{
DataTable dt_goodsname = new DataTable ();
Dt_goodsname = Stockbll. Getlist_goodstype (_peoid). Tables[0]; Get product Category
This.cb_goodstype. Items.clear ();
foreach (DataRow Dr in Dt_goodsname. Rows)
{
String id = dr["goodstype2_id"]. ToString (); Product Category ID
string title = dr["Goodstype2name"]. ToString (); Product Category Name
This.cb_goodstype. Items.Add (title, id); Product Category Bindings
}
DataTable dt_stockname = new DataTable ();
Dt_stockname = Stockbll. Getlist_stockname (_peoid). Tables[0]; Get Warehouse Name
This.cb_stock. Items.clear ();
foreach (DataRow Dr in Dt_stockname. Rows)
{
String stock_id = dr["Genstorageid"]. ToString (); Warehouse ID
String stock_title = dr["Genstoragename"]. ToString (); Warehouse Name
This.cb_stock. Items.Add (Stock_title, stock_id); Warehouse Name Binding
}
This.cb_stock. DataBind ();
This.cb_goodstype. DataBind ();
}
#endregion
How to bind Combox drop-down box data (call stored procedure) in ASP.