ViewPage Class

Definition

Represents the properties and methods that are needed to render a view as a Web Forms page.

public class ViewPage : System.Web.UI.Page, System.Web.Mvc.IViewDataContainer
type ViewPage = class
    inherit Page
    interface IViewDataContainer
Public Class ViewPage
Inherits Page
Implements IViewDataContainer
Inheritance
ViewPage
Derived
Implements

Constructors

ViewPage()

Initializes a new instance of the ViewPage class.

Properties

Ajax

Gets or sets the AjaxHelper object that is used to render HTML in Ajax scenarios.

Html

Gets or sets the HtmlHelper object that is used to render HTML elements.

MasterLocation

Gets or sets the path of the master view.

Model

Gets the Model property of the associated ViewDataDictionary object.

TempData

Gets the temporary data to pass to the view.

Url

Gets or sets the URL of the rendered page.

ViewBag

Gets the view bag.

ViewContext

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

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.

Methods

InitHelpers()

Initializes the Ajax, Html, and Url properties.

OnPreInit(EventArgs)

Raises the PreInit event at the beginning of page initialization.

ProcessRequest(HttpContext)

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

Render(HtmlTextWriter)

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

RenderView(ViewContext)

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

SetTextWriter(TextWriter)
Obsolete.

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

SetViewData(ViewDataDictionary)

Sets the view data dictionary for the associated view.

Applies to