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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:39:56+00:00 2026-05-20T20:39:56+00:00

In ASP.NET MVC I have a controller that looks somehow like this: public class

  • 0

In ASP.NET MVC I have a controller that looks somehow like this:

public class MyController{
    public ActionResult Index(){
        return View(new MyModel());
    }
    [HttpPost]
    public ActionResult Index(MyModel model){
        //do something
        return View("RegistrationConfirmation", new ConfirmModel());
    }
    [HttpPost]
    public ActionResult RegistrationConfirmation(ConfirmModel model){
        //do something else
        return View();
    }
}

User’s workflow that I’d like to have is following

  • GET page index. Returns view Index. URL: ~/My
  • POST data from Index page – returns view RegistrationConfirmation and send the user to right page ~/My/RegistrationConfirmation.
  • User POSTs another data while on RegistrationConfirmation page so that RegistrationConfirmation gets called to process them.

Right now action method RegistrationConfirmation is never called because after returning RegistrationConfirmation view by Index action method URL stays ~/My so the second post is processed by Index(MyModel) action method not by RegistrationConfirmation(ConfirmModel) action method.

How can I change URL along with sending the View so that the controller action that corresponds to the view gets called on POST back ? Or is there any other way how to ensure that corresponding controller is called?


NOTE: I have really read more than 20 questions that seemed to be on topic before posting this one. I don’t think perfect answer to any of them will give me solution. Please read properly before voting to close as duplicate.

  • 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-20T20:39:56+00:00Added an answer on May 20, 2026 at 8:39 pm

    try this one in the view RegistationConfirmation

    you can easily add the action and the controller which should be targeted in the Html.BeginnForm command…

       <% using(Html.BeginForm("RegistrationConfirmation", "MyController")){%>
    
        //form elements
    
       <%}%>
    

    with this you exactly define which action and controller is going to be called

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

Sidebar

Related Questions

I have a controller method in ASP.NET MVC that looks like this: public ActionResult
I have a route in my asp.net mvc 2 site that looks like this
I created a route in ASP.net MVC application that looks like this: routes.MapRoute( ArticleRoute,
I have a model that looks something like this: public class SampleModel { public
I have an Action method in an ASP.NET MVC Controller class that handles form
I have an Asp.Net Mvc website that has a listing controller. The route looks
I have an ASP.NET MVC 3 controller action. That action is defined as follows:
Hallo, I have following jquery code for calling ASP.NET MVC controller method that is
I want to set up a ASP.NET MVC route that looks like: routes.MapRoute( Default,
On my ASP.net MVC 3.0 I have a View looks in that i have

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.