Compartilhar via


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.

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

Syntax

'Declaration
Public Sub New ( _
    controllerContext As ControllerContext, _
    view As IView, _
    viewData As ViewDataDictionary, _
    tempData As TempDataDictionary, _
    writer As TextWriter _
)
public ViewContext(
    ControllerContext controllerContext,
    IView view,
    ViewDataDictionary viewData,
    TempDataDictionary tempData,
    TextWriter writer
)
public:
ViewContext(
    ControllerContext^ controllerContext, 
    IView^ view, 
    ViewDataDictionary^ viewData, 
    TempDataDictionary^ tempData, 
    TextWriter^ writer
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

One of the parameters is null reference (Nothing in Visual Basic).

See Also

Reference

ViewContext Class

ViewContext Overload

System.Web.Mvc Namespace