Share via


ViewContext Constructors

Definition

Overloads

ViewContext()

Initializes a new instance of the ViewContext class.

ViewContext(ControllerContext, IView, ViewDataDictionary, TempDataDictionary, TextWriter)

Initializes a new instance of the ViewContext class by using the specified controller context, view, view data dictionary, temporary data dictionary, and text writer.

ViewContext()

Initializes a new instance of the ViewContext class.

public ViewContext ();
Public Sub New ()

Applies to

ViewContext(ControllerContext, IView, ViewDataDictionary, TempDataDictionary, TextWriter)

Initializes a new instance of the ViewContext class by using the specified controller context, view, view data dictionary, temporary data dictionary, and text writer.

public ViewContext (System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.IView view, System.Web.Mvc.ViewDataDictionary viewData, System.Web.Mvc.TempDataDictionary tempData, System.IO.TextWriter writer);
new System.Web.Mvc.ViewContext : System.Web.Mvc.ControllerContext * System.Web.Mvc.IView * System.Web.Mvc.ViewDataDictionary * System.Web.Mvc.TempDataDictionary * System.IO.TextWriter -> System.Web.Mvc.ViewContext
Public Sub New (controllerContext As ControllerContext, view As IView, viewData As ViewDataDictionary, tempData As TempDataDictionary, writer As TextWriter)

Parameters

controllerContext
ControllerContext

Encapsulates information about the HTTP request.

view
IView

The view to render.

viewData
ViewDataDictionary

The dictionary that contains the data that is required in order to render the view.

tempData
TempDataDictionary

The dictionary that contains temporary data for the view.

writer
TextWriter

The text writer object that is used to write HTML output.

Exceptions

One of the parameters is null.

Applies to