Monday, 19 August 2013

ASP.Net MVC Routing/Using Dynamic Actions

ASP.Net MVC Routing/Using Dynamic Actions

Ok so I am trying to build a controller that has the following action methods
public ActionResult ExecuteStep_1a
public ActionResult ExecuteStep_1b
public ActionResult ExecuteStep_2
Etc...
Is there a way to define a route that uses a get parameter concatenated to
the action name? So for instance the URL would be /step/ExecuteStep_1a. I
tried defining a route with URL equal to:
{controller}/{action}_{number}
with no success. I tried a few other permutations again with no results.
If someone could point me in the right direction I'd appreciate it. Oh I
set action equal to ExecuteResult_ with the default if that adds to my
explanation any.

No comments:

Post a Comment