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 943335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:25:22+00:00 2026-05-15T22:25:22+00:00

This is my application’s current workflow for user registration. register form ( GET /register

  • 0

This is my application’s current workflow for user registration.

  1. register form ( GET /register )
  2. submit the form ( POST /register )
  3. after success, redirect route to “/registerSuccess”
  4. in (GET /registerSuccess ) view, I want to show the message like “username has been registered successfully”.

Controller Actions:

public ActionResult Register()
{
    return View();
}

[HttpPost]
public ActionResult Register(string name, string password, string confirmPassword)
{
    TempData["registered_user"] = name;
    return RedirectToRoute("RegisterSuccess");
}

public ActionResult RegisterSuccess()
{
    return View();
}

RegisterSuccess View

<h2><%: TempData["registered_user"] %> has been registered successfully.</h2>

It is working fine except the username is empty when user refresh the page (GET /registerSuccess).

Is it normal behavior in other applications? or Should I do something about it? 🙂 (It is my pet project and requirements come from me 😛 )

update: Actually, there is one more step which is registered user required admin’s approval. So, I can’t let user log in after successful register. I’m currently using cookie-based FormsAuthentication to track logged in user.

I prefer to use PRG pattern rather than showing flash message in the submit form.

  • 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-15T22:25:23+00:00Added an answer on May 15, 2026 at 10:25 pm

    that is normal behaviour.. when the user ‘refreshes’ the page is requested directly not through your Register function so registered_user key is gone by then. When you do the initial registration you should use a session marker (say a cookie) to track a successfully logged in user.

    Using cookies tutorial is a good place to start

    If you were to use HTTP authentication (say Basic Auth) then the browser submits the username and password (in clear text for basic auth) with every request that sends out a 401 Unauthorized (see HTTP/1.0 Protocol)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 540k
  • Answers 540k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer MasterPage is separate in the heirarchy to Page so you… May 17, 2026 at 2:40 am
  • Editorial Team
    Editorial Team added an answer There are actually two classes involved in implementing a connection… May 17, 2026 at 2:40 am
  • Editorial Team
    Editorial Team added an answer I don't know your use case exactly, but if you… May 17, 2026 at 2:40 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

This application returns schoolmates of lawyers . When a user searches for first name
This application I'm tasked with is basically a CRUD system for what will likely
This application is using windows integrated authentication in IIS. No anonymous login. It's also
this Application.EventManager.on('Click', function(args) { // event listener, args is JSON TestAction.getContents(args.node.id, function(result, e) {
In this application we are developing, we noticed that a view was particularly slow.
This is my first MVC/Linq to SQL Application. I'm using the out of the
I have this application I'm developing in JSP and I wish to export some
I have this application installed on my Macbook Pro that allows me to disable
I have this java swing application that I intend to sell over the internet.
I have this application using CAL. All the modules derive from a special class,

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.