aspx page
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
webservice
[WebMethod]
public CascadingDropDownNameValue[] GetCarMakes()
{
List values = new List();
List GetManulist = new List();
DataSet dsAllManu = ManUtil.GetSet(true);
int countDataset = dsAllManu .Tables["AllManufacturers"].Rows.Count;
List GetManufromDB = new List();
for (int i = 0; i < countDataset; i++)
{
manuid = dsAllManu .Tables["AllManufacturers"].Rows[i]["manuid"].ToString();
Name = dsAllManu.Tables["AllManu"].Rows[i]["Name"].ToString();
GetManufromDB .Add(new Manu(manufacturerid, Name));
}
GetManulist = GetManufromDB ;
for (int i = 0; i < GetManulist .Count; i++)
{
values.Add(new CascadingDropDownNameValue(GetManulist[i].ManuName, GetManulist [i].ManuID.ToString()));
}
return values.ToArray();
}
|