Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 将参数从Ajax JQuery跟踪到[WebMethod]_C#_Asp.net_Webforms - Fatal编程技术网

C# 将参数从Ajax JQuery跟踪到[WebMethod]

C# 将参数从Ajax JQuery跟踪到[WebMethod],c#,asp.net,webforms,C#,Asp.net,Webforms,在Webmethod [WebMethod] public static List<UserModel> GetUsers() [WebMethod] 公共静态列表GetUsers() 如果我们不知道客户端,如何知道参数的名称和类型。 例如:如果我知道名称和类型,我可以获取页面,然后我有如下方法: [WebMethod] public static List<UserModel> GetUsers(int page) [WebMethod] 公共静态列表GetUse

Webmethod

[WebMethod]
public static List<UserModel> GetUsers()
[WebMethod]
公共静态列表GetUsers()
如果我们不知道客户端,如何知道参数的名称和类型。 例如:如果我知道名称和类型,我可以获取页面,然后我有如下方法:

[WebMethod]
public static List<UserModel> GetUsers(int page)
[WebMethod]
公共静态列表GetUsers(int页)
我搜索后发现:
然而,PostSharp并不像我期望的那样。

您在这里的意思是什么,您根本不了解客户端?您可以在web服务内部使用
HttpContext.Current