Controller::View Method (String)
Visual Studio 2010
Creates a ViewResult object by using the view name that renders a view.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
Parameters
- viewName
- Type: System::String
The name of the view that is rendered to the response.
The following example shows how to return a view from an action method. Both action methods return the TestJson.aspx page from the Views subfolder that matches the controller name. The TestJson method defaults to returning the TestJson.aspx page. The TestJsonContent method explicitly returns the TestJson.aspx page.
Community Additions
ADD
Show: