Redirect to last page in asp.net

Filed in .Net Leave a comment

if (!IsPostBack)

{

ViewState[Constants.ViewState.ReferUrl] = Request.UrlReferrer.ToString();

}

protected void btnSignIn_Click(object sender, ImageClickEventArgs e)

{

if (this.SignIn())

{

if (ViewState[Constants.ViewState.ReferUrl] != null)

{

Response.Redirect(ViewState[Constants.ViewState.ReferUrl].ToString(), false);

}

}

}

http://www.dotnetcurry.com/ShowArticle.aspx?ID=89

TOP