Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Request.ServerVariables
Message
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Request.ServerVariables
Miscellaneous
Thread ID:
00758280
Message ID:
00758280
Views:
62
When I use this code I get the correct refering page as expected.
<script language="c#" runat="server">
  void Page_Load(Object sender, EventArgs e)
  {
    NameValueCollection coll;
    Response.Write("Refering Page: " + coll.Get("HTTP_REFERER") + "<br>");
  }
But when I use this other code I get the my home page as the refering page. I don't understand why?
protected void Session_Start(Object sender, EventArgs e)
{
  NameValueCollection coll = Request.ServerVariables;
  string cHttpReferer = coll.Get("HTTP_REFERER");

  // Then I save the information to a database
}
I have all the namespaces in place and the code compiles without any problems.

I want to achieve the same result as if I'm putting my C# code inline with my HTML Code - how can I do this?

TIA
Next
Reply
Map
View

Click here to load this message in the networking platform