Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6804409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:27:45+00:00 2026-05-26T19:27:45+00:00

Scenario I have a site where users can register for a course, I’m developing

  • 0

Scenario

I have a site where users can register for a course, I’m developing a new feature allowing existing students to login with an email & password and register using their previous details.

Architecture

Register.aspx contains an email and password textbox, a login button and a forgot password button. Completing the email and password and clicking the login button results in a cross-page postback to the login.aspx page. Clicking the forgot password button also results in a cross-page postback to the login.aspx page.

Knowing that PreviousPage will be an instance of the code behind class for the Register.aspx page how can I distinguish between the two events (Login/Forgot Password) in the Page_Load for the Login.aspx page?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:27:45+00:00Added an answer on May 26, 2026 at 7:27 pm

    Why not handle the button logic in the code behind then use transfer? That would be easiest as you would have two methods:

    protected Login_Click(...)
    

    and

    protected ForgotPass_Click(...)
    

    When you’re using the cross-page posting, you lose some of the context. You could add that back, however, in the control definition e.g.

    <asp:Button runat="server" Text="Login" PostBackUrl="~/login.aspx?cmd=login" />
    <asp:Button runat="server" Text="Forgot Password" PostBackUrl="~/login.aspx?cmd=forgot" />
    

    Which you can then read like this:

    if(Request.Querystring["cmd"]=="forgot")
        ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm maintaining an ASP.NET site where users can log on to register some set
I have a scenario where users can upload an image, OR a video (from
The scenario is this: I have some users on my site. A user has
Here's the scenario: I have a private site that, once logged on, will display
Scenario : I have a PHP Forum and a Asp.Net site hosted on Linux
Ok, i have simple scenario: have two pages: login and welcome pages. im using
I am working on a site similar to Craigslist where users can make postings
I have a web site which handles files management. User can upload file, add
We have a scenario whereby we are hosting an ASP.NET MVC web site on
Imagine we have a page with a form where users can create their own

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.