Maybe someone else may have an idea or practice of how to work with ajax call in episerver?
because I still can not call my web method...
Doesn´t /search/mymethod work? You also need the WebMethodAttribute decorated on your method. If that does´t work make sure ASP.NET Ajax is working correctly by creating a simple web forms .aspx that inherits from Page with a simple method with the WebMethodAttribute that you can call like any other .aspx (/mytest.aspx/mymethod).
Frederik
So it doesnt work because my url is not correct.. on search page mysite/search/ and url in ajax is
Views/Pages/SearchPageTemplate.aspx/MyMethod..
So when I clicked url is mysite/search/Views/Pages/SearchPageTemplate.aspx/MyMethod it wrong, correct url is
mysite/Views/Pages/SearchPageTemplate.aspx/MyMethod.
I need instance + "Views/Pages/SearchPageTemplate.aspx/MyMethod". Maybe You can prompt how to get instance ?
Thanks in advance.
Hi.
I have search page template which have web method. So i create in admin mode search page (mysite.com/search/)
So how I can call from ajax her web method?
PS: In standart asp.net web from I can call web method like this