ViewPage<TModel> ViewPage<TModel> ViewPage<TModel> Class


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


The type of the model.



ViewPage<TModel>() ViewPage<TModel>() ViewPage<TModel>()

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


Ajax Ajax Ajax

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

Html Html Html

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

MasterLocation MasterLocation MasterLocation

Gets or sets the path of the master view.

(Inherited from ViewPage)
Model Model Model

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

TempData TempData TempData

Gets the temporary data to pass to the view.

(Inherited from ViewPage)
Url Url Url

Gets or sets the URL of the rendered page.

(Inherited from ViewPage)
ViewBag ViewBag ViewBag

Gets the view bag.

(Inherited from ViewPage)
ViewContext ViewContext ViewContext

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

(Inherited from ViewPage)
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.

(Inherited from ViewPage)


InitHelpers() InitHelpers() InitHelpers()

Instantiates and initializes the Ajax and Html properties.

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

Raises the PreInit event at the beginning of page initialization.

(Inherited from ViewPage)
ProcessRequest(HttpContext) ProcessRequest(HttpContext) ProcessRequest(HttpContext)

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

(Inherited from ViewPage)
Render(HtmlTextWriter) Render(HtmlTextWriter) Render(HtmlTextWriter)

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

(Inherited from ViewPage)
RenderView(ViewContext) RenderView(ViewContext) RenderView(ViewContext)

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

(Inherited from ViewPage)
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.

(Inherited from ViewPage)
SetViewData(ViewDataDictionary) SetViewData(ViewDataDictionary) SetViewData(ViewDataDictionary)

Sets the view data dictionary for the associated view.

Applies to