Controller.View Method

Definition

Overloads

View(String, String, Object)

Creates a ViewResult object using the view name, master-page name, and model that renders a view.

View()

Creates a ViewResult object that renders a view to the response.

View(Object)

Creates a ViewResult object by using the model that renders a view to the response.

View(String)

Creates a ViewResult object by using the view name that renders a view.

View(IView)

Creates a ViewResult object that renders the specified IView object.

View(String, Object)

Creates a ViewResult object that renders the specified IView object.

View(String, String)

Creates a ViewResult object using the view name and master-page name that renders a view to the response.

View(IView, Object)

Creates a ViewResult object that renders the specified IView object.

View(String, String, Object)

Creates a ViewResult object using the view name, master-page name, and model that renders a view.

protected internal virtual System.Web.Mvc.ViewResult View(string viewName, string masterName, object model);

Parameters

viewName
String

The name of the view that is rendered to the response.

masterName
String

The name of the master page or template to use when the view is rendered.

model
Object

The model that is rendered by the view.

Returns

The view result.

Applies to

View()

Creates a ViewResult object that renders a view to the response.

protected internal System.Web.Mvc.ViewResult View();

Returns

The View() result that renders a view to the response.

Applies to

View(Object)

Creates a ViewResult object by using the model that renders a view to the response.

protected internal System.Web.Mvc.ViewResult View(object model);

Parameters

model
Object

The model that is rendered by the view.

Returns

The view result.

Applies to

View(String)

Creates a ViewResult object by using the view name that renders a view.

protected internal System.Web.Mvc.ViewResult View(string viewName);

Parameters

viewName
String

The name of the view that is rendered to the response.

Returns

The view result.

Applies to

View(IView)

Creates a ViewResult object that renders the specified IView object.

protected internal System.Web.Mvc.ViewResult View(System.Web.Mvc.IView view);

Parameters

view
IView

The view that is rendered to the response.

Returns

The view result.

Applies to

View(String, Object)

Creates a ViewResult object that renders the specified IView object.

protected internal System.Web.Mvc.ViewResult View(string viewName, object model);

Parameters

viewName
String

The view that is rendered to the response.

model
Object

The model that is rendered by the view.

Returns

The view result.

Applies to

View(String, String)

Creates a ViewResult object using the view name and master-page name that renders a view to the response.

protected internal System.Web.Mvc.ViewResult View(string viewName, string masterName);

Parameters

viewName
String

The name of the view that is rendered to the response.

masterName
String

The name of the master page or template to use when the view is rendered.

Returns

The view result.

Applies to

View(IView, Object)

Creates a ViewResult object that renders the specified IView object.

protected internal virtual System.Web.Mvc.ViewResult View(System.Web.Mvc.IView view, object model);

Parameters

view
IView

The view that is rendered to the response.

model
Object

The model that is rendered by the view.

Returns

The view result.

Applies to