-
Servervariable in C#
Hello buddies,
I am tring to get a value from ServerVariable using following code.
but it is giving me error like this
System.Web.HttpRequest.ServerVariables' denotes a 'property' where a 'method' was expected
Mu code is as follows :
string strVariable;
strVariable = HttpContext.Current.Request.ServerVariables("HTTP_REFERER");
if (Page.IsPostBack ==false)
{
Session["LastPage"] = Request.ServerVariables("HTTP_REFERER");
}
can anybodt help me out
thanks & regards
pankaj
-
Re: Servervariable in C#
Code:
string strVariable;
strVariable = HttpContext.Current.Request.ServerVariables["HTTP_REFERER"];
if (Page.IsPostBack ==false)
{
Session["LastPage"] = Request.ServerVariables["HTTP_REFERER"];
}
-
Re: Servervariable in C#
thanks sixfeetsix , i have done it already