在asp.net中从客户端调用服务器端函数

在asp.net中从客户端调用服务器端函数

问题描述:

我想调用一个函数,该函数用aspx.cs编写.
来自javascript

任何帮助请

I want to call a function, which is written in aspx.cs
from javascript

any help please

这可能对您有所帮助.

链接1 [链接2 [
This may help you.

Link 1[^]

Link 2[^]


选择各种相同的方法:
1. XMLHttpRequest
2. PageMethod
3.客户端回调
4.使用更新面板的ASP.NET AJAX.

选择您喜欢的一个,然后在其中选择Google,然后选择与其相关的任何文章以在您的项目中实现它.
Choose one of the various ways to do the same:
1. XMLHttpRequest
2. PageMethod
3. Client Callback
4. ASP.NET AJAX using Update Panel.

Pick the one you like, just Google on that and choose any article related to it to implement it in your project.


设置页面均值.aspx属性PageMethod = true
现在调用.aspx.cs文件中存在的任何函数.
Set page mean .aspx attribute PageMethod=true
and now call any function which present in .aspx.cs file.