Controller.View Controller.View Controller.View Method

Definition

Overloads

View(String, String, Object) View(String, String, Object) View(String, String, Object)

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

View() View() View()

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

View(Object) View(Object) View(Object)

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

View(String) View(String) View(String)

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

View(IView) View(IView) View(IView)

Creates a ViewResult object that renders the specified IView object.

View(String, Object) View(String, Object) View(String, Object)

Creates a ViewResult object that renders the specified IView object.

View(String, String) View(String, String) 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) View(IView, Object) View(IView, Object)

Creates a ViewResult object that renders the specified IView object.

View(String, String, Object) View(String, String, 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);
abstract member View : string * string * obj -> System.Web.Mvc.ViewResult
override this.View : string * string * obj -> System.Web.Mvc.ViewResult
Protected Friend Overridable Function View (viewName As String, masterName As String, model As Object) As ViewResult
Parameters
viewName
String String String

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

masterName
String String String

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

model
Object Object Object

The model that is rendered by the view.

Returns

The view result.

View() View() View()

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

protected internal System.Web.Mvc.ViewResult View ();
member this.View : unit -> System.Web.Mvc.ViewResult
Protected Friend Function View () As ViewResult
Returns

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

View(Object) View(Object) 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);
member this.View : obj -> System.Web.Mvc.ViewResult
Protected Friend Function View (model As Object) As ViewResult
Parameters
model
Object Object Object

The model that is rendered by the view.

Returns

The view result.

View(String) View(String) View(String)

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

protected internal System.Web.Mvc.ViewResult View (string viewName);
member this.View : string -> System.Web.Mvc.ViewResult
Protected Friend Function View (viewName As String) As ViewResult
Parameters
viewName
String String String

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

Returns

The view result.

View(IView) View(IView) View(IView)

Creates a ViewResult object that renders the specified IView object.

protected internal System.Web.Mvc.ViewResult View (System.Web.Mvc.IView view);
member this.View : System.Web.Mvc.IView -> System.Web.Mvc.ViewResult
Protected Friend Function View (view As IView) As ViewResult
Parameters
view
IView IView IView

The view that is rendered to the response.

Returns

The view result.

View(String, Object) View(String, Object) View(String, Object)

Creates a ViewResult object that renders the specified IView object.

protected internal System.Web.Mvc.ViewResult View (string viewName, object model);
member this.View : string * obj -> System.Web.Mvc.ViewResult
Protected Friend Function View (viewName As String, model As Object) As ViewResult
Parameters
viewName
String String String

The view that is rendered to the response.

model
Object Object Object

The model that is rendered by the view.

Returns

The view result.

View(String, String) View(String, String) 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);
member this.View : string * string -> System.Web.Mvc.ViewResult
Protected Friend Function View (viewName As String, masterName As String) As ViewResult
Parameters
viewName
String String String

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

masterName
String String String

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

Returns

The view result.

View(IView, Object) View(IView, Object) 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);
abstract member View : System.Web.Mvc.IView * obj -> System.Web.Mvc.ViewResult
override this.View : System.Web.Mvc.IView * obj -> System.Web.Mvc.ViewResult
Protected Friend Overridable Function View (view As IView, model As Object) As ViewResult
Parameters
view
IView IView IView

The view that is rendered to the response.

model
Object Object Object

The model that is rendered by the view.

Returns

The view result.

Applies to