Declares an MVC controller for a string argument passed to the ActionLink, RenderAction or Action methods, referencing an undeclared controller. The action referenced from the same method call is automatically added to the generated controller class.
Availability
From the context menus or via shortcuts:
- when the edit cursor or caret is on an appropriate string argument passed to the ActionLink, RenderAction or Action methods.
Example
<%: Html.ActionLink("Test", "TestAction", "Test")%>
Result:
public class TestController : Controller
{
public ActionResult TestAction()
{
return View();
}
}
Public Class TestController
Inherits Controller
Public Function TestAction() As ActionResult
Return View()
End Function
End Class
We are updating the DevExpress product documentation website and this page is part of our new experience. During this transition period, product documentation remains available in our previous format at documentation.devexpress.com. Learn More...