Results 1 to 3 of 3

Thread: Servervariable in C#

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2003
    Location
    india
    Posts
    273

    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

  2. #2
    Addicted Member
    Join Date
    Jan 2005
    Location
    Montréal
    Posts
    160

    Re: Servervariable in C#

    Code:
    string strVariable;
    strVariable = HttpContext.Current.Request.ServerVariables["HTTP_REFERER"];
    
    if (Page.IsPostBack ==false)
    {
    Session["LastPage"] = Request.ServerVariables["HTTP_REFERER"];
    }
    There are no stupid questions, but a whole bunch of dumb sayings !

    Save time on database code, try DataLG !

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    May 2003
    Location
    india
    Posts
    273

    Re: Servervariable in C#

    thanks sixfeetsix , i have done it already

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width