I have a web method:
[System.Web.Services.WebMethod] public static string getCharacterstics(int product_id, int lang_id) {
I want to access it using PageMethods, for example: (Provided that I have Enable PageMethods in ScriptManager):
<script type="text/javascript"> $(document).ready( function () { $('#characterstics').html("loading"); </script>
I get the error message "http-verb message to access the path .. not allowed"
I searched for it and searched for SO too, but got no solution regarding it. Based on ASP.NET Routing.
I believe that due to asp.net routing, service methods are not available.
Also, I think I can't even use JSON due to asp.net routing.
Any help is appreciated.
Updated:
If I run a page with this url:
http:
The web method completed successfully.
Now
I have a routing like this:
routes.MapPageRoute("searchdetail", "searchdetail/{ID}", "~/searchdetail.aspx"); routes.MapPageRoute("searchdetail", "searchdetail", "~/searchdetail.aspx");
The set_path () function will work only for case 2 without an identifier, but does not work with case 1
if i try
http:
It works great
but if I try to use:
http:
It gives the error expected by the object.
So set_path () is the option I have to write.