ralphtrent
Programmer
hello
I have an aspx page that calls a class in a .cs file.
I need to read a cookie in the cs file. Since the cookie object lies in the System.Web.UI.Page.Request namespace, I need to pass in my current page's object to my class file
example
Is there a way in cs file to not have to request the HttpRequest each time and just read the stack some how?
Thanks,
RalphTrent
I have an aspx page that calls a class in a .cs file.
I need to read a cookie in the cs file. Since the cookie object lies in the System.Web.UI.Page.Request namespace, I need to pass in my current page's object to my class file
example
Code:
[green]// in aspx[/green]
object cookieValue = Common.WebCore.ReadCookie("cookieName", this.Page.Request);
[green]// in cs[/green]
static internal string ReadCooke(string CookieName, HttpRequst CurrentRequest)
{
return CurrentRequest.Cookie[CookieName].Value;
}
Is there a way in cs file to not have to request the HttpRequest each time and just read the stack some how?
Thanks,
RalphTrent