aspx.cs页面中的ASP.NET Webmethod无法访问page.Request对象
有人知道如何从aspx.cs页面访问带有[WebMethod]属性的静态方法中的HttpRequest.Cookies吗 它不会让我这样做,因为方法是静态的aspx.cs页面中的ASP.NET Webmethod无法访问page.Request对象,asp.net,httprequest,webmethod,Asp.net,Httprequest,Webmethod,有人知道如何从aspx.cs页面访问带有[WebMethod]属性的静态方法中的HttpRequest.Cookies吗 它不会让我这样做,因为方法是静态的 [WebMethod] public static bool PostToTwitter(string identityUrl, string message, bool autoFollow) { Page.Request.Cookies -- object reference is required for non-static f
[WebMethod]
public static bool PostToTwitter(string identityUrl, string message, bool autoFollow)
{
Page.Request.Cookies -- object reference is required for non-static field
谢谢 使用
HttpContext.Current.Request.Cookies