I’d like to move an asp.net mvc response to
http://example.com/emails/list/rob@email.com
Using RedirectToAction(“list”, “emails”, new { id = “rob@email.com”}); takes you to http://example.com/emails/list?id=rob@email.com.
What am I doing wrong?
Thanks,
Rob
Seems like misconfigured routing. Your RegisterRoutes method in Global.asax.cs should look like this:
In line “{controller}/{action}/{id}” presence of {id} means that is going to be substituted by it’s value.
Any other parameter that is not present in routing string would be decoded as ?some_param=value