从JavaScript调用ASP.NET Web应用程序中函数背后的C#代码 [英] invoke c# code behind function in asp.net web applicatio from javascript
本文介绍了从JavaScript调用ASP.NET Web应用程序中函数背后的C#代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要从asp.net Web应用程序中的javascript调用c#函数吗?
或者,如果没有,我想通过javascript将Windows Media Player的Mutate属性设置为true.
如果有人知道其中任何一个,请帮助我.
I need to invoke a c# function from javascript in my asp.net web application is it possible?
Or, if not, I want to set the mute property of windows media player to true from javascript.
If anybody knows any one of this please help me.
推荐答案
u必须为此使用AJAX dll
看到这个
http://msdn.microsoft.com/en-us/library/aa479042.aspx [ ^ ]
u have to use AJAX dll for that
see this
http://msdn.microsoft.com/en-us/library/aa479042.aspx[^]
我相信以下链接可以帮助您解决第一个问题
http://msdn.microsoft.com/en-us/library/ms178208.aspx [ ^ ]
这使用了客户端回调功能(可从ASP.NET 2.0获得)
I belive the following link can help you to resolve the first one
http://msdn.microsoft.com/en-us/library/ms178208.aspx[^]
This uses client call back feature (This is available from ASP.NET 2.0)
我需要从我的asp.net Web应用程序中的javascript调用ac#函数. /i>
是的你可以.试试:
1. XMLHttpRequest
2. PageMethods
3.回调
选择一个适合您的实施.
i need to invoke a c# function from javascript in my asp.net web application is it possible
Yes, you can. Try:
1. XMLHttpRequest
2. PageMethods
3. Callback
Pick the one that suits you and implement it.
这篇关于从JavaScript调用ASP.NET Web应用程序中函数背后的C#代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文