Introduction:
Here I will explain how to solve the problem “Method error 500/12031 in ajax cascadingdropdown extender” using asp.net.
Description:
In previous post I explained clearly about Ajaxcascading dropdownlist sample. Generally during implementation of cascading dropdonlist we will see our dropdowns shows error like “Method error 500 or Method Error 12031”. This error is occurred because of missing following line of code in WebService.
Here I will explain how to solve the problem “Method error 500/12031 in ajax cascadingdropdown extender” using asp.net.
Description:
In previous post I explained clearly about Ajaxcascading dropdownlist sample. Generally during implementation of cascading dropdonlist we will see our dropdowns shows error like “Method error 500 or Method Error 12031”. This error is occurred because of missing following line of code in WebService.
[System.Web.Script.Services.ScriptService()]
|
After
add above line of code to our web service page code would be like this
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.Web.Script.Services.ScriptService()]
// To
allow this Web Service to be called from script, using ASP.NET AJAX,
uncomment the following line.
//
[System.Web.Script.Services.ScriptService]
public class CascadingDropdown
: System.Web.Services.WebService
{
|
After
add above line of code try to run application it will work for you.
Still if you’re getting same error try
to add ValidateRequest="false"
in @Page line of web page like <%@ Page ...... ValidateRequest ="false" %>
Happy
Coding………
0 comments :
Post a Comment