ViewContext Constructor

 

Initializes a new instance of the ViewContext class.

Namespace:   System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

NameDescription
System_CAPS_pubmethodViewContext()

Initializes a new instance of the ViewContext class.

System_CAPS_pubmethodViewContext(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.

Return to top

ViewContext Constructor ()

Initializes a new instance of the ViewContext class.

new : unit -> ViewContext
Return to top

ViewContext Constructor (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.

new : 
        controllerContext:ControllerContext *
        view:IView *
        viewData:ViewDataDictionary *
        tempData:TempDataDictionary *
        writer:TextWriter -> ViewContext

Parameters

controllerContext
Type: System.Web.Mvc.ControllerContext

Encapsulates information about the HTTP request.

view
Type: System.Web.Mvc.IView

The view to render.

viewData
Type: System.Web.Mvc.ViewDataDictionary

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

tempData
Type: System.Web.Mvc.TempDataDictionary

The dictionary that contains temporary data for the view.

writer
Type: System.IO.TextWriter

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

Exception Condition
ArgumentNullException

One of the parameters is null.

Return to top
Show: