Hello,
I have a problem with my webmethod using an episerver PageTemplate.
If I browse the page localhost/Views/Pages/myPage.aspx and from this page click the button to execute my c# method it works properly.
However, if I browse the page localhost/en/myfriendlyurl and click the same button, the post return a 404 page not found error.
Below my code:
in myPage.aspx i enabled the pageMethod
and add the script
function test() { PageMethods.Register("a string", "another sting", true, true, onSucess, onError); function onSucess(result) { //alert('Success'); } function onError(result) { alert('Something wrong.'); } }
The backend code I added the WebMethod attr.
[WebMethod] public static void Register(string s1, string s2, bool b1, bool b2) { .... ... }
What's wrong?
Hello,
I have a problem with my webmethod using an episerver PageTemplate.
If I browse the page localhost/Views/Pages/myPage.aspx and from this page click the button to execute my c# method it works properly.
However, if I browse the page localhost/en/myfriendlyurl and click the same button, the post return a 404 page not found error.
Below my code:
in myPage.aspx i enabled the pageMethod
and add the script
The backend code I added the WebMethod attr.
What's wrong?