How do I get the action name from a base controller?
Posted
by griegs
on Stack Overflow
See other posts from Stack Overflow
or by griegs
Published on 2010-05-27T05:27:48Z
Indexed on
2010/05/27
5:31 UTC
Read the original article
Hit count: 158
asp.net-mvc
|controller
Hi, I'd like to implement a base controller on one of my controllers. Within that base controller, I'd like to be able to get the current executing ActionResult name.
How would I go about doing this?
public class HomeController : ControllerBase
{
public ActionResult Index()
{
And;
public class ControllerBase : Controller
{
public ControllerBase()
{
//method which will get the executing ActionResult
}
}
© Stack Overflow or respective owner