Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
I am asking for login to user while moving next page and showing message for login on popup. my login is on master page..
//code on login page
if (!string.IsNullOrEmpty(Request.QueryString["ReturnUrl"]))
        {
       
            //Response.Write(retrnurl);
            string retrnurl = Request.QueryString["ReturnUrl"].ToString();
            retrnurl = "product_title.aspx";
            Response.Redirect(retrnurl,true);
 
        }
Posted 3-Feb-13 21:09pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Instead u can write like this
 
Request.UrlReferrer returns the previous page url.Save it in view state.
 
 Dim str As String = Convert.ToString(Request.UrlReferrer)
            ViewState("PreviousPage") = str
WHENEEVER U WANT TO Go Back
Dim str As String = Convert.ToString(ViewState("PreviousPage"))
        Response.Redirect(str)
  Permalink  
Comments
Member 9579525 at 4-Feb-13 6:23am
   
thnx....how to ReturnUrl with all querysreing parameters of requesting page
supriya chaladi at 4-Feb-13 6:45am
   
url = "../Lab Reports/LabReports_MB.aspx?ORDNO=" & pOrdNo.ToString & "&ORDDTLNO=" & pOrdDtlNo.ToString

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 434
1 ridoy 368
2 DamithSL 270
3 OriginalGriff 159
4 Suvendu Shekhar Giri 150
0 OriginalGriff 7,968
1 DamithSL 6,179
2 Sergey Alexandrovich Kryukov 5,524
3 Maciej Los 5,438
4 Kornfeld Eliyahu Peter 4,539


Advertise | Privacy | Mobile
Web03 | 2.8.141223.1 | Last Updated 4 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100