Click here to Skip to main content
11,493,154 members (61,546 online)
   

ASP.NET

 
Questionhow to redirect in a url? Pin
Jassim Rahma17-Jan-13 10:42
memberJassim 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? Pin
Parwej Ahamad18-Jan-13 8:17
memberParwej Ahamad18-Jan-13 8:17 
GeneralRe: how to redirect in a url? Pin
Jassim Rahma18-Jan-13 8:36
memberJassim Rahma18-Jan-13 8:36 
GeneralRe: how to redirect in a url? Pin
Parwej Ahamad18-Jan-13 18:23
memberParwej Ahamad18-Jan-13 18:23 
AnswerRe: how to redirect in a url? Pin
Rekhash19-Jan-13 0:01
memberRekhash19-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
Web01 | 2.8.150520.1 | Last Updated 27 May 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid