Hello,
Right now i am working on a project,i am facing a problem in cascading dropdown
I have three drop down and i had filled dropdown1 succesfully and then i had filled dropdown two on selected index of dpd1 and then drop three on selected index of dpd2.....now what happen when i am selecting index of dpd2 then it automaticali move back to is selcted index 1 on. so please help me where i am lacking in my code and it happen so...my code is like...
ut.dropdownlistBind(DropDownList6, "SELECT [Site_ID],[Site_Name] FROM [FacilitiesManagementDB ].[dbo].[AssetSiteDetails] where [Company_ID]='" + Session["compid"].ToString().Trim() + "' order by [Site_Name] ", "Site_Name", "Site_ID");
ddlAssetSite.Items.Insert(0, "----Select Site----");
protected void DropDownList6_SelectedIndexChanged(object sender, EventArgs e)
{
ut.dropdownlistBind(DropDownList9, "SELECT distinct [Site_ID],[RoomLocation] FROM [FacilitiesManagementDB ].[dbo].[Room_mst1] where [Company_ID]='" + Session["compid"].ToString().Trim() + "' and Site_ID='" + DropDownList6.SelectedValue.ToString() + "' order by [RoomLocation] ", "RoomLocation", "Site_ID");
DropDownList9.Items.Insert(0, "----Select Block----");
}
protected void DropDownList7_SelectedIndexChanged(object sender, EventArgs e)
{
ut.dropdownlistBind(DropDownList8, "SELECT [Site_ID],[RoomNo],[RoomLocation] FROM [FacilitiesManagementDB ].[dbo].[Room_mst1] where [Company_ID]='" + Session["compid"].ToString().Trim() + "' and Site_ID='" + DropDownList6.SelectedValue.ToString() + "' and RoomLocation='" + DropDownList7.SelectedItem.ToString() + "' order by [RoomNo] ", "RoomNo", "RoomLocation");
DropDownList8.Items.Insert(0, "----Select Room----");
}
i am also using Ajax tool kit script manager is there any problem due to that..
Thanx in advance...