Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Request.ServerVariables
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Request.ServerVariables
Divers
Thread ID:
00758280
Message ID:
00758280
Vues:
64
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform