5
我想在我的一个控制器上实现一个基础控制器。在该基本控制器中,我希望能够获得当前正在执行的ActionResult名称。如何从基本控制器获取操作名称?
我该怎么做呢?
public class HomeController : ControllerBase
{
public ActionResult Index()
{
而且;
public class ControllerBase : Controller
{
public ControllerBase()
{
//method which will get the executing ActionResult
}
}
啊,太棒了!谢谢@Darin。 – griegs 2010-05-27 05:37:26
@griegs,你是多么欢迎。 – 2010-05-27 05:40:16