所以我们有[HttpPost],它是一个可选属性.据我所知,这会限制调用,因此只能通过HTTP POST请求进行调用.我的问题是为什么我要这样做?
什么是Web服务中的Web方法属性?举个例子
[WebMethod(EnableSession = true)]
[ScriptMethod(UseHttpGet = true)]
public string GetApplicationDomains(string strParameterList)
{
}
Run Code Online (Sandbox Code Playgroud)
为什么使用WebMethod和ScriptMethod这个属性?
asp.net ×1
asp.net-mvc ×1
attributes ×1
c# ×1
http-get ×1
http-post ×1
web-services ×1
webmethod ×1