I just started learning MVC3 today, so please forgive any stupidity (particularly a poorly named title).
This URL doesn’t work:
.../Test
But this one does:
.../Index
Here’s my code:
public class MyController : Controller
{
public ActionResult Index()
{
return View();
}
}
public static class MyExt
{
public static ActionResult Test(this MyController test)
{
return test.Index();
}
}
The extension method won’t work because
ControllerActionInvokeronly invokes methods of a controller. You can read more about ASP.NET MVC pipeline here.