This project is read-only.

Get ActionResult and Controller Names

Jun 27, 2013 at 3:44 PM
Is it possible to get the action and controller names from a T4MVC Action result?
Jun 27, 2013 at 3:48 PM
Ah answer my own question

by the look of it...
Jun 27, 2013 at 3:51 PM
Yes, though this is the first time I hear about someone needing this :)
Jun 27, 2013 at 3:53 PM
Edited Jun 27, 2013 at 3:54 PM
I'm using the SagePayMVC Library and this is setup to take strings for the action and the controller rather than an action result.
This allows me to still avoid the magic strings.

Jun 27, 2013 at 4:00 PM
Then you should be able to use T4MVC constants instead, e.g. MVC.Home.Name and MVC.Home.ActionNames.Index. See 2.3 in the doc.
Jun 27, 2013 at 4:03 PM
Thanks David that looks clearer.