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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:52:03+00:00 2026-05-24T10:52:03+00:00

In the process of updating a C# MVC 2.0 application! I have a view

  • 0

In the process of updating a C# MVC 2.0 application!

I have a view “Signup” and another view “ForgotPassword”.

Each view have a with a submit button.

Each form is submitted to the same Controller but to two different ActionResult:

[HttpPost]
public ActionResult Signup(SignupModel signupModel)
{…}

[HttpPost]
public ActionResult ForgotPwd(ForgotPasswordModel forgotPasswordModel)
{…}

Upon completion my goal is to redirect the user to a “thankyou” page but based on where the user is coming from (either Signup or ForgotPassword) I wish to display a particular message (or a different UI).

Inside the same Controller, I created a “Thankyou” ActionResult:

public ViewResult Thankyou() 
{
    return View(); 
}

I was thinking of adding a parameter to my Thankyou() method which would allow me to know where the user is coming from (Signup or ForgotPwd). From there, make the “thankyou” page display the appropriate UI/message.

I’m looking for a clean and simple solution.

Should I create two View User Controls and show the appropriate one based on the parameter being passed?

In addition, instead of having an “ActionResult” for my Thankyou() method couldn’t I use a “PartialViewResult” ?


EDIT:
I was actually considering something along those lines…

Where ThankyouType is an Enum.

[HttpPost]
public ActionResult Signup(SignupModel signupModel)
{
    //Validation code...
    return View("Thankyou", ThankyouType.SignupDone);
}

[HttpPost]
public ActionResult ForgotPassword(ForgotPasswordModel forgotPasswordModel)
{
    //Validation code...
    return View("Thankyou", ThankyouType.ForgotPasswordDone);
}

And then have my “Thankyou” ViewResult like this:

public ViewResult Thankyou(ThankyouType type) 
{ 
    return View(type); 
}

Doesn’t seem like I can create a strongly typed view based on Enum (unless I’m wrong).

Perhaps I’ll read more on PartialViewResults and/or find examples…but then again, I could be completely wrong.

  • 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-24T10:52:04+00:00Added an answer on May 24, 2026 at 10:52 am

    I would personally give the ThankYou view a model that has the message you want to display, and have your two controller actions render the ThankYou view directly on success rather than calling a ThankYou action.

    However, if you’re sure you want a redirect, you may consider using the TempData collection to store a message or a key of some kind. The ThankYou controller can then retrieve this value and pass it to the View. This situation is what TempData was made for.

    Edit

    There’s no reason you shouldn’t be able to use an enum value as your model type, but if that gives you trouble you should at least be able to create a model type that has an enum property on it.

    The strategy of sending the ThankYouType as part of the redirect request would work just fine, if that’s what you prefer. The only potential downside is that it would look like this in the URL:

    http://domain.com/controller/ThankYou?type=ForgotPasswordDone
    

    I have no real arguments against it. There are lots of options. Use the one that feels best to you.

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

Sidebar

Related Questions

I have an onchange event that updates a form, and in the updating process
Suppose I have a process that is updating a record and encounters a record
Now I have discovered Jquery I'm in the process of updating my site. Could
I'm in the process of updating a legacy application to use Java 6 SE
I have written a Firefox extension and am currently in the process of updating
I have an app which calls another process in a command window and that
We have a process updating the database which uses the following SQL IF NOT
I am in the process of updating an existing application from Ext 3.x to
We’re currently in the process of updating the email dispatch part of our application
I'm in the process of updating an existing application that currently can only be

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.