tags:

views:

121

answers:

1

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();
}
+2  A: 

You need to return the redirection command as result:

public ActionResult PassThrough (long i)
{
    return RedirectToAction("RedirectAction", new { d = i});
}
Developer Art
Haha... didn't we just have this question?
womp
@womp: Dunno, I just came out of the bath.
Developer Art
sorry, i forgot to add the return but it is there. i did a search and didn't find the question you were talking about. can you give me a link?
Bruce227