PageMethod and URl Rewrite

I have a problem with my pagemethod + url rewrite.

Using a regular URL: http://myweb.com/mypages/abc.aspx

calling the PageMethod function works fine.

But when I use the friendly URL: http://myweb.com/abc , it really works. Error.

Any help would be greatly appreciated.

+2
source share
2 answers

You can set the correct path to the aspx file from javascript using the PageMethods.set_path method:

<script type="text/javascript">
   PageMethods.set_path("/mypages/abc.aspx");
</script>

The answer is taken from the asp.net official forum:

http://forums.asp.net/p/1599846/4066920.aspx#4066920

+5
source

, , , :

pagemethods :

<script>
   PageMethods.set_path("/foo/bar.aspx");
</script>
0

All Articles