Click here to Skip to main content
15,920,468 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Help in Java script Pin
AprNgp1-Sep-09 21:14
AprNgp1-Sep-09 21:14 
GeneralRe: Help in Java script Pin
Christian Graus1-Sep-09 21:19
protectorChristian Graus1-Sep-09 21:19 
AnswerRe: Help in Java script Pin
Abhishek Sur1-Sep-09 21:45
professionalAbhishek Sur1-Sep-09 21:45 
GeneralRe: Help in Java script Pin
Christian Graus1-Sep-09 21:59
protectorChristian Graus1-Sep-09 21:59 
GeneralRe: Help in Java script Pin
Abhishek Sur1-Sep-09 22:34
professionalAbhishek Sur1-Sep-09 22:34 
GeneralRe: Help in Java script Pin
Christian Graus2-Sep-09 0:19
protectorChristian Graus2-Sep-09 0:19 
GeneralRe: Help in Java script Pin
Abhishek Sur2-Sep-09 2:01
professionalAbhishek Sur2-Sep-09 2:01 
QuestionTo ensure that users come from page1 before going to page2 Pin
Desmond Lim1-Sep-09 20:49
Desmond Lim1-Sep-09 20:49 
Hi guys,

I'm wondering if it there is a better way of doing this, I have 2 webpages, page1 and page2. I want to ensure that users would go to page1 before going to page2 (a button on page1, redirects it to page2), so that if the user types in the URL of page2, it will redirect to page1 first. I am currently using the Request.UrlReferrer.ToString() to get the the previous webpage and comparing it. If it is from page1 then page2 will open if not it will redirect to page1 (the code is below). I'm just wondering if there is a better way of doing this?

Thanks.

protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        if (Request.UrlReferrer.ToString() != "page1")
        {
            Response.Redirect("page1");
        }
    }
}

AnswerRe: To ensure that users come from page1 before going to page2 Pin
Christian Graus1-Sep-09 20:51
protectorChristian Graus1-Sep-09 20:51 
GeneralRe: To ensure that users come from page1 before going to page2 Pin
Desmond Lim1-Sep-09 20:55
Desmond Lim1-Sep-09 20:55 
GeneralRe: To ensure that users come from page1 before going to page2 Pin
Christian Graus1-Sep-09 21:06
protectorChristian Graus1-Sep-09 21:06 
GeneralRe: To ensure that users come from page1 before going to page2 Pin
AprNgp1-Sep-09 20:59
AprNgp1-Sep-09 20:59 
GeneralRe: To ensure that users come from page1 before going to page2 Pin
Christian Graus1-Sep-09 21:06
protectorChristian Graus1-Sep-09 21:06 
GeneralRe: To ensure that users come from page1 before going to page2 Pin
AprNgp1-Sep-09 21:08
AprNgp1-Sep-09 21:08 
QuestionChanging password using membership provider Pin
Shahdat Hosain1-Sep-09 20:40
Shahdat Hosain1-Sep-09 20:40 
AnswerRe: Changing password using membership provider Pin
Christian Graus1-Sep-09 20:53
protectorChristian Graus1-Sep-09 20:53 
GeneralRe: Changing password using membership provider Pin
Shahdat Hosain1-Sep-09 22:17
Shahdat Hosain1-Sep-09 22:17 
AnswerRe: Changing password using membership provider Pin
AprNgp1-Sep-09 21:00
AprNgp1-Sep-09 21:00 
AnswerRe: Changing password using membership provider Pin
droth172-Sep-09 5:20
droth172-Sep-09 5:20 
Questionuri format not supported error Pin
sjs4u1-Sep-09 20:10
sjs4u1-Sep-09 20:10 
AnswerRe: uri format not supported error Pin
Abhijit Jana1-Sep-09 20:14
professionalAbhijit Jana1-Sep-09 20:14 
GeneralRe: uri format not supported error Pin
sjs4u1-Sep-09 20:27
sjs4u1-Sep-09 20:27 
AnswerRe: uri format not supported error Pin
Christian Graus1-Sep-09 20:49
protectorChristian Graus1-Sep-09 20:49 
GeneralRe: uri format not supported error Pin
sjs4u1-Sep-09 20:57
sjs4u1-Sep-09 20:57 
GeneralRe: uri format not supported error Pin
Christian Graus1-Sep-09 21:08
protectorChristian Graus1-Sep-09 21:08 

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.