开发者

How do I call a service from within my Assembly?

开发者 https://www.devze.com 2022-12-25 07:16 出处:网络
I have a C# library. From within it, I want to call a stat开发者_开发问答ic method that exists within the same library but through Javascript. Can I use WebResource to call a C# method?You will have t

I have a C# library. From within it, I want to call a stat开发者_开发问答ic method that exists within the same library but through Javascript. Can I use WebResource to call a C# method?


You will have to create a "proxy" to call that method. From javascript you can call
- Page Method
- HttpHandler
- Web Service

So will be your proxy on charge of calling the method you want and returning the result to javascript (more likely using json format)

Please let me know if you need some examples about how to use any of these mecanisms

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号