Click here to Skip to main content
       

ASP.NET

 
Questionhow to redirect in a url? PinmemberJassim Rahma17-Jan-13 10:42 
I am using this to redirect to comment page:
 
Response.Redirect(String.Format("~/{0}/Comment/{1}", Page.RouteData.Values["ADDRESS"], Page.RouteData.Values["GUID"]), false);
 
I want, if the user is not signed in to redirect to /signin but with mentioning the original page so when user signs ij it will automatically redirect to the original page. something like:
 
if (Session["volow_member_id"] == null || Session["volow_member_guid"] == null)
{
    Response.Redirect("~/Signin/" + String.Format("~/{0}/Comment/{1}", Page.RouteData.Values["ADDRESS"], Page.RouteData.Values["GUID"]), false);
}
else
{
    Response.Redirect(String.Format("~/{0}/Comment/{1}", Page.RouteData.Values["ADDRESS"], Page.RouteData.Values["GUID"]), false);
}
how can i do this?

 
Technology News @ www.JassimRahma.com

AnswerRe: how to redirect in a url? PinmemberParwej Ahamad18-Jan-13 8:17 
GeneralRe: how to redirect in a url? PinmemberJassim Rahma18-Jan-13 8:36 
GeneralRe: how to redirect in a url? PinmemberParwej Ahamad18-Jan-13 18:23 
AnswerRe: how to redirect in a url? PinmemberRekhash19-Jan-13 0:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 20 Dec 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid