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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:29:39+00:00 2026-06-12T13:29:39+00:00

In my asp.net mvc 2 application, why are parameters passed via RedirectToAction sometimes lost?

  • 0

In my asp.net mvc 2 application, why are parameters passed via RedirectToAction sometimes lost?

This perplexes me. Sometimes using RedirectToAction works, sometimes it doesn’t. I haven’t found any rhyme or reason to it. Here’s an example:

        return RedirectToAction("ExportReport",
            new { FieldOrder = fieldOrder });

I’ve also tried this variant:

        return RedirectToAction("ExportReport", "SearchAndExport",
            new { FieldOrder = fieldOrder });

I added the following in my global.asax.cs:

        routes.MapRoute(
            "ExportReport",
            "{controller}.aspx/{action}/{FieldOrder}",
            new { controller = "SearchAndExport", action = "ExportReport", FieldOrder = UrlParameter.Optional }
          );

And lastly, the prototype for the action I’m redirecting to:

public FileContentResult ExportReport(List<String> FieldOrder)

FieldOrder’s data never makes it to the redirected action. Why? I know I’ve done this and had it work many times as well. What gives?

EDIT 1

To make it perfectly clear, FieldOrder is a List<String>. I am not using site areas. The redirect itself works, but the data is not passed to the method. I have verified that there is data that should be passed via debug.

Also, I’d rather not use TempData. If you have more than one action redirect to another more general action, that becomes messy. It’s cleaner (IMHO) to just pass the data via the parameter.

  • 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-06-12T13:29:40+00:00Added an answer on June 12, 2026 at 1:29 pm

    Going over some of my old questions here…

    The reason these redirect values were getting lost was that I was passing a complex object as a parameter. ASP.NET MVC 2 did not handle these. Redirects with primitive type parameters will work fine.

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

Sidebar

Related Questions

Here's the situation: ASP.NET MVC 3 application using Razor as the view engine. Works
In my ASP.NET MVC application I am using a select list control to generate
This is the situation: I have an ASP.NET MVC 4 application. When I run
I am developping a web application by using the ASP .NET MVC 3 framework.
I have a web application built in asp.net mvc using forms authentication. I am
I am developing an ASP.Net MVC 3 application using Entity Framework 4.1. For a
I have an ASP.NET MVC 3 application. I'm using AsyncController and creating new threads.
I am developing an ASP.Net MVC 3 application using Entity Framework 4.1. For one
I am using a Flash/Flex uploading component in my ASP.NET MVC application. My action
I am building an ASP.NET MVC application using the 1.0 release using Visual Web

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.