Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Response.Redirect() in Page_Load
Message
De
09/06/2008 22:02:50
 
 
À
09/06/2008 02:39:28
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01322028
Message ID:
01322723
Vues:
9
Sorry type too fast, type 2 line of response.redirect, actaclly 1 line should be server.transfer(login.aspx");

Response.Redirect("login.aspx");<--------------------------Server.Transfer("login.aspx");
//Response.Redirect("login.aspx");




protected void Page_Load(object sender, EventArgs e)
{
if (User.Identity.IsAuthenticated == false)
{
Server.Transfer("login.aspx"); <--------------- here....
//Response.Redirect("login.aspx");
}
}


in 2nd page : login.aspx
protected void Page_Load(object sender, EventArgs e)
{
if (Request.UrlReferrer != null) //<---- alway get null
{

Label1.Text = Request.UrlReferrer.ToString();
}
}
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform