Click here to Skip to main content
15,917,565 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: AutoRedirect... Pin
R. Giskard Reventlov19-Feb-10 5:31
R. Giskard Reventlov19-Feb-10 5:31 
GeneralRe: AutoRedirect... Pin
awedaonline19-Feb-10 7:11
awedaonline19-Feb-10 7:11 
GeneralRe: AutoRedirect... Pin
R. Giskard Reventlov19-Feb-10 7:20
R. Giskard Reventlov19-Feb-10 7:20 
GeneralRe: AutoRedirect... Pin
Not Active19-Feb-10 7:26
mentorNot Active19-Feb-10 7:26 
AnswerRe: AutoRedirect... Pin
Rutvik Dave19-Feb-10 7:53
professionalRutvik Dave19-Feb-10 7:53 
GeneralRe: AutoRedirect... Pin
Brij19-Feb-10 8:19
mentorBrij19-Feb-10 8:19 
GeneralRe: AutoRedirect... Pin
awedaonline3-Mar-10 23:18
awedaonline3-Mar-10 23:18 
AnswerRe: AutoRedirect... Pin
JimBob SquarePants19-Feb-10 12:23
JimBob SquarePants19-Feb-10 12:23 
Passing the page that performed the redirect to your login would be quite easy. Just use a querystring.

e.g
default.aspx

//get the current page url
String url = Page.Request.RawUrl;

//redirect the page to your new one
Response.Redirect(String.Format(CultureInfo.InvariantCulture, "~/login.aspx?pp={0}", url));


login.aspx

//get the url of the previous page.
if(Request.RawUrl.Contains("?pp="))
{
string previousPage = Request.QueryString["pp"]);
}


Once you have your value you could use the login control LoggedIn event
to redirect to you original page using the query string you have captured.

I know it's a chore but I heartily recommend getting a book on Asp.Net. Most beginners books will have plenty of information about this.

Good luck!
JimBob SquarePants
*******************************************************************
"He took everything personally, including our royalties!"
David St.Hubbins, Spinal Tap about Ian Faith, their ex-manager
*******************************************************************

GeneralRe: AutoRedirect... Pin
awedaonline3-Mar-10 23:17
awedaonline3-Mar-10 23:17 
QuestionAccessing WebUserControls and Webform properties Pin
markymark8219-Feb-10 0:18
markymark8219-Feb-10 0:18 
AnswerRe: Accessing WebUserControls and Webform properties Pin
Chetan Patel19-Feb-10 1:32
Chetan Patel19-Feb-10 1:32 
Questionconnection to sqlservercompactedition Pin
4anusha419-Feb-10 0:13
4anusha419-Feb-10 0:13 
QuestionDrop Down Weird behaviour Pin
Mogamboo_Khush_Hua18-Feb-10 23:44
Mogamboo_Khush_Hua18-Feb-10 23:44 
AnswerRe: Drop Down Weird behaviour Pin
R. Giskard Reventlov19-Feb-10 0:37
R. Giskard Reventlov19-Feb-10 0:37 
QuestionDatalist in Crystal Report Pin
srikanta42218-Feb-10 23:37
srikanta42218-Feb-10 23:37 
QuestionSSRS permission Pin
arkiboys18-Feb-10 23:04
arkiboys18-Feb-10 23:04 
AnswerRe: SSRS permission Pin
arkiboys18-Feb-10 23:17
arkiboys18-Feb-10 23:17 
GeneralRe: SSRS permission Pin
arkiboys19-Feb-10 0:24
arkiboys19-Feb-10 0:24 
QuestionUsing page break in printing word document Pin
samerh18-Feb-10 22:45
samerh18-Feb-10 22:45 
QuestionError Pin
arkiboys18-Feb-10 21:52
arkiboys18-Feb-10 21:52 
AnswerRe: Error Pin
arkiboys18-Feb-10 22:01
arkiboys18-Feb-10 22:01 
GeneralRe: Error Pin
arkiboys18-Feb-10 22:14
arkiboys18-Feb-10 22:14 
GeneralRe: Error Pin
Brij18-Feb-10 22:43
mentorBrij18-Feb-10 22:43 
QuestionCheck duplicate before inserting in database [modified] Pin
Mogamboo_Khush_Hua18-Feb-10 19:45
Mogamboo_Khush_Hua18-Feb-10 19:45 
AnswerRe: Check duplicate before inserting in database Pin
Pranay Rana18-Feb-10 20:17
professionalPranay Rana18-Feb-10 20:17 

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

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