Search code examples
asp.netcookieswebmethod

using WebMethod to read cookie but no Request.Cookies collection


I am trying to read cookie without post back. I used WebMethod to save the cookie, but cannot find way to retrieve it. For some reason, I cannot find Request.Cookies collection so that I can retrieve the value of it. Any help will be appreciated!


Solution

  • use this in your web method

    HttpContext.Current.Request.Cookies