Reputation: 903
I have the following code but it doesn't seem to redirect to my action with the given parameter. I have redirected something similar but the parameters were query string parameters. I'm wondering if it is done another way for parameters since the following doesn't work or what I might be doing wrong in my call to the action?
public ActionResult PassThrough (long i)
{
return RedirectToAction("RedirectAction", new { d = i});
}
public ActionResult RedirectAction (long d)
{
return SomeView();
}
Upvotes: 0
Views: 1925
Reputation:
You need to return the redirection command as result:
public ActionResult PassThrough (long i)
{
return RedirectToAction("RedirectAction", new { d = i});
}
Upvotes: 3