In my .ascx page there was some javascript functions.I want to send the value from this java script function to the codebehind file to execute a method.
I tried to use PageMethods but it was getting errors.As i google about this problem i found that PageMethods cannot use with .ascx control pages it can be only used with .aspx pages.
Please give me some suggestion how could i perform my task..
最简单的方法似乎是重构要运行到aspx页面中的功能(可以使用pagemethod)并使用javascript调用它。
Try using a webservice instead of pagemethods. Check out the msdn doc it has a pretty decent example.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.