ViewPage ViewPage 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
ViewPageViewPageViewPage
Derived
Implements

Constructors

ViewPage() ViewPage() ViewPage()

Initializes a new instance of the ViewPage class.

Properties

Ajax Ajax Ajax

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

Html Html Html

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

MasterLocation MasterLocation MasterLocation

Gets or sets the path of the master view.

Model Model Model

Gets the Model property of the associated ViewDataDictionary object.

TempData TempData TempData

Gets the temporary data to pass to the view.

Url Url Url

Gets or sets the URL of the rendered page.

ViewBag ViewBag ViewBag

Gets the view bag.

ViewContext ViewContext ViewContext

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

ViewData ViewData ViewData

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

Writer Writer Writer

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

Methods

InitHelpers() InitHelpers() InitHelpers()

Initializes the Ajax, Html, and Url properties.

OnPreInit(EventArgs) OnPreInit(EventArgs) OnPreInit(EventArgs)

Raises the PreInit event at the beginning of page initialization.

ProcessRequest(HttpContext) ProcessRequest(HttpContext) ProcessRequest(HttpContext)

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

Render(HtmlTextWriter) Render(HtmlTextWriter) Render(HtmlTextWriter)

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

RenderView(ViewContext) RenderView(ViewContext) RenderView(ViewContext)

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

SetTextWriter(TextWriter) SetTextWriter(TextWriter) SetTextWriter(TextWriter)

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

SetViewData(ViewDataDictionary) SetViewData(ViewDataDictionary) SetViewData(ViewDataDictionary)

Sets the view data dictionary for the associated view.

Applies to