i am getting the error as method error 500 in dropdownlist.
Code:
[WebMethod]
[System.Web.Script.Services.ScriptMethod]
public static CascadingDropDownNameValue[] GetDropDownContentsPageMethod(string knownCategoryValues, string category)
{
return new categorylist().GetDropDownContents(knownCategoryValues, category);
}
<div class="row">
<div class="form-group">
<div class="col-sm-2"></div>
<label class="control-label col-sm-2" for="Category">Category:</label>
<div class="col-sm-8">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:DropDownList ID="DropDownList1" runat="server" EnableViewState="False"
AppendDataBoundItems="True" CssClass="form-control" style="width:50%;">
</asp:DropDownList>
<ajaxToolkit:CascadingDropDown ID="CascadingDropDown1" runat="server" TargetControlID="DropDownList1"
PromptText="Please select" Category="category1" ServicePath="categorylist.asmx"
ServiceMethod="GetDropDownContents" LoadingText="[Loading sections…]">
</ajaxToolkit:CascadingDropDown>
<asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ErrorMessage="* Select Category"
ControlToValidate="DropDownList1"></asp:RequiredFieldValidator>
</div>
</div>
</div>