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

  • Home
  • SEARCH
  • 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 75671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:33:10+00:00 2026-05-10T20:33:10+00:00

I want to redirect from an action in one controller to an action in

  • 0

I want to redirect from an action in one controller to an action in a second controller. Normally I would use RedirectToAction(‘actionName’, ‘controllerName’, objects); The method I want to redirect to has two overloads:

  • One for HttpVerbs.Get that is used for direct linking
  • One for HttpVerbs.Post accepting reference types that get filled through modelbinding

When I do my redirect with the RedirectToAction method, I get redirected to the GET method by default which off course doesn’t match my parameters.
How can I make sure it redirects to the correct action’s overload?

–EDIT–
On request some more specific details:
The action I want to redirect to fills the viewData based on the parameters and then calls the correct view.

public ActionResult OverView(SearchBag searchBag, IngredientBag ingredientBag) { 

It has a second version for Gets so it can work by GET too:

[AcceptVerbs(HttpVerbs.Get)] public ActionResult OverView(int colorId, string paintCode, string name, int formulaId) {     return OverView(new SearchBag()          { ColorId = colorId, PaintCode = paintCode, ColorName = name, FormulaId = formulaId }             , formulaViewData.IngredientBag); } 

The one I’m calling now is in a different controller. It does some pre-calculations, fetches the information needed and then does the exact same thing as the previous actions. I could replicate the code from the first action, but I would rather just call that action.

[AcceptVerbs(HttpVerbs.Post)] public RedirectToRouteResult ReCalculate(SearchBag searchBag, IngredientBag ingredientBag) { 

I could create a temporary local instance of that next controller, but I noticed it doesn’t have the correct HTTPContext and doesn’t hit Initialization methods.

  • 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. 2026-05-10T20:33:10+00:00Added an answer on May 10, 2026 at 8:33 pm

    You can not use RedirectToAction (or anything else) to cause the browser to redirect with a HTTP POST. You may be able to hack it with some JavaScript but it would be ugly.

    If you can provide some more details about the target action that you would like to redirect the user to we can provide better answers for you. Please update your question with the signature of the target action and details on what you want to provide as parameter values so people can provide decent guidance.

    I’m guessing what you want to do is to store some data in TempData, call RedirectToAction, load from TempData in the target Controller/Action and process.

    For more information on TempData see these questions; http://www.google.com/search?q=tempdata+site%3Astackoverflow.com

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

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer As stated in the comments by apphacker we don't really… May 11, 2026 at 3:23 pm
  • added an answer You can't. If the browser (i.e. JavaScript) is supposed to… May 11, 2026 at 3:23 pm
  • added an answer var products = from p in mycontext.Products select new {… May 11, 2026 at 3:23 pm

Related Questions

How can I render after executing an action in a restful controller instead of
In my Rails app, I have a form which redirects through a foreign service,
I have installed and implemented the plugin restful_authentication from technoweenie. My application is, for
From reading here and around the net, I'm close to assuming the answer is

Trending Tags

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

Top Members

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.