-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Open
Labels
affected-mediumThis issue impacts approximately half of our customersThis issue impacts approximately half of our customersarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-routingseverity-majorThis label is used by an internal toolThis label is used by an internal tool
Milestone
Description
This action won't load the parameter with a passed route value from a redirection because it has a default.
public IActionResult HelloWorld(string message="")
{
ViewData["Message"] = message; // If sent 'Howdy' from SendMsg() message will be empty
return View();
}
public IActionResult() SendMsg()
{
return RedirectToAction("HelloWorld", new{ message="Howdy" });
}
/***********************************************/
// But this works ok if there is no default value on the param:
public IActionResult HelloWorld(string message)
{
ViewData["Message"] = message; // message will hold 'Howdy' now
return View();
}I never observed this before, so it might be a long-standing issues, normal behavior, or whatever.
Metadata
Metadata
Assignees
Labels
affected-mediumThis issue impacts approximately half of our customersThis issue impacts approximately half of our customersarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-routingseverity-majorThis label is used by an internal toolThis label is used by an internal tool