General information
Category:
Coding, syntax and commands
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();
}
}
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only