I had this working. I would email a link to a page (i.e. Work.aspx), and using the code below, the user would be routed to the login page and then sent to Work.aspx after logging in.
But since I added a site map this isn't working. I always go directly to my home page. If I set Work.aspx as my start page in VS it works, but not if I click a link in the email.
Any thoughts?
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.User.Identity.IsAuthenticated)
Response.Redirect("~/Login.aspx" + "?ReturnUrl=~/Work.aspx");
}
protected void Page_Load(object sender, EventArgs ...
Go to the complete details ...