Cascading Dropdown without using any web service
I was looking for a way to make a Cascading dropdown menu without using a webservice and find this link
I tried the suggestion at the bottom but I got a 500 method error. I searched for this error on the internet, but all I can find is to increase the size of the jasonerislation web service, but I am not using the web service at all, so I don't think that this is applicable.
Does anyone know how to make a cascading dropdown menu without using a web service, or find a better tutorial / howto?
thanks
source to share
The Cascading Dropdown element is not intended to be used without a web service. I was having big problems with managing large datasets. I ended up with:
<asp:ScriptManager ID="ScriptManager" runat="server" />
<asp:UpdatePanel ID="Panel1" runat="server" ChildrenAsTriggers="true">
<ContentTemplate>
<asp:DropDownList ID="ddlDropdown1" runat="server" OnSelectedIndexChanged="ddlDropdown1_IndexChanged" AutoPostBack="true" />
<asp:DropDownList ID="ddlDropdown2" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
protected void ddlDropdown1_IndexChanged (object sender, EventArgs e)
{
// Do database access
....
// Populate ddlDropdown2
}
This will allow you to fill in as many levels of the dropdowns as you like. This solution doesn't use Cascading Dropdown but gives you the same effect. Error 500 is a generic data error from AJAX and usually indicates that you are not using the [ScriptService ()] decorator over the webservice class.
source to share