how to bind 2 dropdownlist from one public function
i have 2 ddl on one aspx apage but in different panel.
i create a function. this function fetch data frm database nd fill the list.
but the problem is i want to fill both ddl with this function.
dont want to create same function for my 2nd list
the function is
private void CategoryListBind()
{
ItemCategoryBE objCat = new ItemCategoryBE();
objCat.ID = 0;
DataSet ds = new DataSet();
ds = ItemCategoryBL.SelectCategoryBL(objCat);
ddlCate.DataSource = ds;
ddlCate.DataTextField = "CName";
ddlCate.DataValueField = "ID";
ddlCate.DataBind();
}
if i want to fill 2nd ddl2 through this code but due to list name i cannot able to do
can any one please tell me the FACTORY which can fill any dropdownlist on the page. i hope you'll get my point
Thanks