Table of Contents

Class ViewPage<TModel>

Namespace
System.Web.Mvc
Assembly
System.Web.Mvc.dll

Represents the information that is required in order to render a strongly typed view as a Web Forms page.

public class ViewPage<TModel> : ViewPage, IViewDataContainer

Type Parameters

TModel

The type of the model.

Inheritance
ViewPage<TModel>
Implements
Inherited Members

Constructors

ViewPage()

Initializes a new instance of the ViewPage<TModel> class.

public ViewPage()

Properties

Ajax

Gets or sets the AjaxHelper<TModel> object that supports rendering HTML in Ajax scenarios.

public AjaxHelper<TModel> Ajax { get; set; }

Property Value

AjaxHelper<TModel>

The Ajax helper object that is associated with the view.

Html

Gets or sets the HtmlHelper object that provides support for rendering elements.

public HtmlHelper<TModel> Html { get; set; }

Property Value

HtmlHelper<TModel>

The HTML helper object that is associated with the view.

Model

Gets the Model property of the associated ViewDataDictionary<TModel> object.

public TModel Model { get; }

Property Value

TModel

A reference to the data model.

ViewData

Gets or sets a dictionary that contains data to pass between the controller and the view.

public ViewDataDictionary<TModel> ViewData { get; set; }

Property Value

ViewDataDictionary<TModel>

A dictionary that contains data to pass between the controller and the view.

Methods

InitHelpers()

Instantiates and initializes the Ajax and Html properties.

public override void InitHelpers()

SetViewData(ViewDataDictionary)

Sets the view data dictionary for the associated view.

protected override void SetViewData(ViewDataDictionary viewData)

Parameters

viewData ViewDataDictionary

A dictionary of data to pass to the view.