ViewPage<TModel> Class

Definition

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

public class ViewPage<TModel> : System.Web.Mvc.ViewPage
type ViewPage<'Model> = class
    inherit ViewPage
Public Class ViewPage(Of TModel)
Inherits ViewPage

Type Parameters

TModel

The type of the model.

Inheritance
ViewPage<TModel>

Constructors

ViewPage<TModel>()

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

Properties

Ajax

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

Html

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

MasterLocation

Gets or sets the path of the master view.

(Inherited from ViewPage)
Model

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

TempData

Gets the temporary data to pass to the view.

(Inherited from ViewPage)
Url

Gets or sets the URL of the rendered page.

(Inherited from ViewPage)
ViewBag

Gets the view bag.

(Inherited from ViewPage)
ViewContext

Gets or sets the information that is used to render the view.

(Inherited from ViewPage)
ViewData

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

Writer

Gets the text writer that is used to render the view to the response.

(Inherited from ViewPage)

Methods

InitHelpers()

Instantiates and initializes the Ajax and Html properties.

OnPreInit(EventArgs)

Raises the PreInit event at the beginning of page initialization.

(Inherited from ViewPage)
ProcessRequest(HttpContext)

Enables processing of the specified HTTP request by the ASP.NET MVC framework.

(Inherited from ViewPage)
Render(HtmlTextWriter)

Initializes the HtmlTextWriter object that receives the page content to be rendered.

(Inherited from ViewPage)
RenderView(ViewContext)

Renders the view page to the response using the specified view context.

(Inherited from ViewPage)
SetTextWriter(TextWriter)
Obsolete.

Note: This API is now obsolete.Sets the text writer that is used to render the view to the response.

(Inherited from ViewPage)
SetViewData(ViewDataDictionary)

Sets the view data dictionary for the associated view.

Applies to