ViewPage<TModel> Class

 

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

Namespace:   System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

Inheritance Hierarchy

System.Object
  System.Web.UI.Control
    System.Web.UI.TemplateControl
      System.Web.UI.Page
        System.Web.Mvc.ViewPage
          System.Web.Mvc.ViewPage<TModel>

Syntax

public class ViewPage<TModel> : ViewPage
generic<typename TModel>
public ref class ViewPage : ViewPage
type ViewPage<'TModel> = 
    class
        inherit ViewPage
    end
Public Class ViewPage(Of TModel)
    Inherits ViewPage

Type Parameters

  • TModel
    The type of the model.

Constructors

Name Description
System_CAPS_pubmethod ViewPage<TModel>()

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

Properties

Name Description
System_CAPS_protproperty Adapter

(Inherited from Control.)

System_CAPS_pubproperty Ajax

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

System_CAPS_pubproperty Application

(Inherited from Page.)

System_CAPS_pubproperty AppRelativeTemplateSourceDirectory

(Inherited from Control.)

System_CAPS_pubproperty AppRelativeVirtualPath

(Inherited from TemplateControl.)

System_CAPS_pubproperty AsyncTimeout

(Inherited from Page.)

System_CAPS_pubproperty AutoPostBackControl

(Inherited from Page.)

System_CAPS_pubproperty Cache

(Inherited from Page.)

System_CAPS_protproperty ChildControlsCreated

(Inherited from Control.)

System_CAPS_pubproperty ClientID

(Inherited from Control.)

System_CAPS_pubproperty ClientIDMode

(Inherited from Control.)

System_CAPS_protproperty ClientIDSeparator

(Inherited from Control.)

System_CAPS_pubproperty ClientQueryString

(Inherited from Page.)

System_CAPS_pubproperty ClientScript

(Inherited from Page.)

System_CAPS_pubproperty ClientTarget

(Inherited from Page.)

System_CAPS_protproperty Context

(Inherited from Page.)

System_CAPS_pubproperty Controls

(Inherited from Control.)

System_CAPS_pubproperty Culture

(Inherited from Page.)

System_CAPS_protproperty DesignMode

(Inherited from Control.)

System_CAPS_pubproperty EnableTheming

(Inherited from TemplateControl.)

System_CAPS_pubproperty EnableViewState

(Inherited from Page.)

System_CAPS_pubproperty ErrorPage

(Inherited from Page.)

System_CAPS_protproperty Events

(Inherited from Control.)

System_CAPS_pubproperty Form

(Inherited from Page.)

System_CAPS_protproperty HasChildViewState

(Inherited from Control.)

System_CAPS_pubproperty Header

(Inherited from Page.)

System_CAPS_pubproperty Html

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

System_CAPS_pubproperty ID

(Inherited from Control.)

System_CAPS_protproperty IdSeparator

(Inherited from Control.)

System_CAPS_pubproperty IsAsync

(Inherited from Page.)

System_CAPS_pubproperty IsCallback

(Inherited from Page.)

System_CAPS_protproperty IsChildControlStateCleared

(Inherited from Control.)

System_CAPS_pubproperty IsCrossPagePostBack

(Inherited from Page.)

System_CAPS_pubproperty IsPostBack

(Inherited from Page.)

System_CAPS_pubproperty IsPostBackEventControlRegistered

(Inherited from Page.)

System_CAPS_protproperty IsTrackingViewState

(Inherited from Control.)

System_CAPS_pubproperty IsValid

(Inherited from Page.)

System_CAPS_protproperty IsViewStateEnabled

(Inherited from Control.)

System_CAPS_pubproperty Items

(Inherited from Page.)

System_CAPS_protproperty LoadViewStateByID

(Inherited from Control.)

System_CAPS_pubproperty MaintainScrollPositionOnPostBack

(Inherited from Page.)

System_CAPS_pubproperty Master

(Inherited from Page.)

System_CAPS_pubproperty MasterLocation

Gets or sets the path of the master view.(Inherited from ViewPage.)

System_CAPS_pubproperty MasterPageFile

(Inherited from Page.)

System_CAPS_pubproperty MetaDescription

(Inherited from Page.)

System_CAPS_pubproperty MetaKeywords

(Inherited from Page.)

System_CAPS_pubproperty Model

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

System_CAPS_pubproperty ModelBindingExecutionContext

(Inherited from Page.)

System_CAPS_pubproperty ModelState

(Inherited from Page.)

System_CAPS_pubproperty NamingContainer

(Inherited from Control.)

System_CAPS_pubproperty Page

(Inherited from Control.)

System_CAPS_pubproperty PageAdapter

(Inherited from Page.)

System_CAPS_protproperty PageStatePersister

(Inherited from Page.)

System_CAPS_pubproperty Parent

(Inherited from Control.)

System_CAPS_pubproperty PreviousPage

(Inherited from Page.)

System_CAPS_pubproperty RenderingCompatibility

(Inherited from Control.)

System_CAPS_pubproperty Request

(Inherited from Page.)

System_CAPS_pubproperty Response

(Inherited from Page.)

System_CAPS_pubproperty RouteData

(Inherited from Page.)

System_CAPS_pubproperty Server

(Inherited from Page.)

System_CAPS_pubproperty Session

(Inherited from Page.)

System_CAPS_pubproperty Site

(Inherited from Control.)

System_CAPS_pubproperty SkinID

(Inherited from Control.)

System_CAPS_pubproperty SmartNavigation

(Inherited from Page.)

System_CAPS_pubproperty StyleSheetTheme

(Inherited from Page.)

System_CAPS_pubproperty TempData

Gets the temporary data to pass to the view.(Inherited from ViewPage.)

System_CAPS_pubproperty TemplateControl

(Inherited from Control.)

System_CAPS_pubproperty TemplateSourceDirectory

(Inherited from Control.)

System_CAPS_pubproperty Theme

(Inherited from Page.)

System_CAPS_pubproperty Title

(Inherited from Page.)

System_CAPS_pubproperty Trace

(Inherited from Page.)

System_CAPS_pubproperty UICulture

(Inherited from Page.)

System_CAPS_protproperty UniqueFilePathSuffix

(Inherited from Page.)

System_CAPS_pubproperty UniqueID

(Inherited from Control.)

System_CAPS_pubproperty UnobtrusiveValidationMode

(Inherited from Page.)

System_CAPS_pubproperty Url

Gets or sets the URL of the rendered page.(Inherited from ViewPage.)

System_CAPS_pubproperty User

(Inherited from Page.)

System_CAPS_pubproperty ValidateRequestMode

(Inherited from Control.)

System_CAPS_pubproperty Validators

(Inherited from Page.)

System_CAPS_pubproperty ViewBag

Gets the view bag.(Inherited from ViewPage.)

System_CAPS_pubproperty ViewContext

Gets or sets the information that is used to render the view.(Inherited from ViewPage.)

System_CAPS_pubproperty ViewData

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

System_CAPS_protproperty ViewState

(Inherited from Control.)

System_CAPS_protproperty ViewStateIgnoresCase

(Inherited from Control.)

System_CAPS_pubproperty ViewStateMode

(Inherited from Control.)

System_CAPS_pubproperty ViewStateUserKey

(Inherited from Page.)

System_CAPS_pubproperty Visible

(Inherited from Page.)

System_CAPS_pubproperty Writer

Gets the text writer that is used to render the view to the response.(Inherited from ViewPage.)

Methods

Name Description
System_CAPS_protmethod AddedControl(Control, Int32)

(Inherited from Control.)

System_CAPS_pubmethod AddOnPreRenderCompleteAsync(BeginEventHandler, EndEventHandler)

(Inherited from Page.)

System_CAPS_pubmethod AddOnPreRenderCompleteAsync(BeginEventHandler, EndEventHandler, Object)

(Inherited from Page.)

System_CAPS_protmethod AddParsedSubObject(Object)

(Inherited from Control.)

System_CAPS_pubmethod ApplyStyleSheetSkin(Page)

(Inherited from Control.)

System_CAPS_protmethod BuildProfileTree(String, Boolean)

(Inherited from Control.)

System_CAPS_protmethod ClearCachedClientID()

(Inherited from Control.)

System_CAPS_protmethod ClearChildControlState()

(Inherited from Control.)

System_CAPS_protmethod ClearChildState()

(Inherited from Control.)

System_CAPS_protmethod ClearChildViewState()

(Inherited from Control.)

System_CAPS_protmethod ClearEffectiveClientIDMode()

(Inherited from Control.)

System_CAPS_protmethod Construct()

(Inherited from TemplateControl.)

System_CAPS_protmethod CreateChildControls()

(Inherited from Control.)

System_CAPS_protmethod CreateControlCollection()

(Inherited from Control.)

System_CAPS_protmethod CreateHtmlTextWriter(TextWriter)

(Inherited from Page.)

System_CAPS_protmethod CreateResourceBasedLiteralControl(Int32, Int32, Boolean)

(Inherited from TemplateControl.)

System_CAPS_pubmethod DataBind()

(Inherited from Control.)

System_CAPS_protmethod DataBind(Boolean)

(Inherited from Control.)

System_CAPS_protmethod DataBindChildren()

(Inherited from Control.)

System_CAPS_protmethod DeterminePostBackMode()

(Inherited from Page.)

System_CAPS_protmethod DeterminePostBackModeUnvalidated()

(Inherited from Page.)

System_CAPS_pubmethod Dispose()

(Inherited from Control.)

System_CAPS_protmethod EnsureChildControls()

(Inherited from Control.)

System_CAPS_protmethod EnsureID()

(Inherited from Control.)

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Eval(String)

(Inherited from TemplateControl.)

System_CAPS_protmethod Eval(String, String)

(Inherited from TemplateControl.)

System_CAPS_pubmethod ExecuteRegisteredAsyncTasks()

(Inherited from Page.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod FindControl(String)

(Inherited from Page.)

System_CAPS_protmethod FindControl(String, Int32)

(Inherited from Control.)

System_CAPS_pubmethod Focus()

(Inherited from Control.)

System_CAPS_protmethod FrameworkInitialize()

(Inherited from Page.)

System_CAPS_pubmethod GetDataItem()

(Inherited from Page.)

System_CAPS_protmethod GetDesignModeState()

(Inherited from Control.)

System_CAPS_protmethod GetGlobalResourceObject(String, String)

(Inherited from TemplateControl.)

System_CAPS_protmethod GetGlobalResourceObject(String, String, Type, String)

(Inherited from TemplateControl.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_protmethod GetLocalResourceObject(String)

(Inherited from TemplateControl.)

System_CAPS_protmethod GetLocalResourceObject(String, Type, String)

(Inherited from TemplateControl.)

System_CAPS_pubmethod GetPostBackClientEvent(Control, String)

(Inherited from Page.)

System_CAPS_pubmethod GetPostBackClientHyperlink(Control, String)

(Inherited from Page.)

System_CAPS_pubmethod GetPostBackEventReference(Control)

(Inherited from Page.)

System_CAPS_pubmethod GetPostBackEventReference(Control, String)

(Inherited from Page.)

System_CAPS_pubmethod GetRouteUrl(Object)

(Inherited from Control.)

System_CAPS_pubmethod GetRouteUrl(RouteValueDictionary)

(Inherited from Control.)

System_CAPS_pubmethod GetRouteUrl(String, Object)

(Inherited from Control.)

System_CAPS_pubmethod GetRouteUrl(String, RouteValueDictionary)

(Inherited from Control.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod GetUniqueIDRelativeTo(Control)

(Inherited from Control.)

System_CAPS_pubmethod GetValidators(String)

(Inherited from Page.)

System_CAPS_pubmethod HasControls()

(Inherited from Control.)

System_CAPS_protmethod HasEvents()

(Inherited from Control.)

System_CAPS_pubmethod InitHelpers()

Instantiates and initializes the Ajax and Html properties.(Overrides ViewPage.InitHelpers().)

System_CAPS_protmethod InitializeCulture()

(Inherited from Page.)

System_CAPS_pubmethod IsClientScriptBlockRegistered(String)

(Inherited from Page.)

System_CAPS_protmethod IsLiteralContent()

(Inherited from Control.)

System_CAPS_pubmethod IsStartupScriptRegistered(String)

(Inherited from Page.)

System_CAPS_pubmethod LoadControl(String)

(Inherited from TemplateControl.)

System_CAPS_pubmethod LoadControl(Type, Object[])

(Inherited from TemplateControl.)

System_CAPS_protmethod LoadControlState(Object)

(Inherited from Control.)

System_CAPS_protmethod LoadPageStateFromPersistenceMedium()

(Inherited from Page.)

System_CAPS_pubmethod LoadTemplate(String)

(Inherited from TemplateControl.)

System_CAPS_protmethod LoadViewState(Object)

(Inherited from Control.)

System_CAPS_pubmethod MapPath(String)

(Inherited from Page.)

System_CAPS_protmethod MapPathSecure(String)

(Inherited from Control.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethod OnAbortTransaction(EventArgs)

(Inherited from TemplateControl.)

System_CAPS_protmethod OnBubbleEvent(Object, EventArgs)

(Inherited from Control.)

System_CAPS_protmethod OnCommitTransaction(EventArgs)

(Inherited from TemplateControl.)

System_CAPS_protmethod OnDataBinding(EventArgs)

(Inherited from Control.)

System_CAPS_protmethod OnError(EventArgs)

(Inherited from TemplateControl.)

System_CAPS_protmethod OnInit(EventArgs)

(Inherited from Page.)

System_CAPS_protmethod OnInitComplete(EventArgs)

(Inherited from Page.)

System_CAPS_protmethod OnLoad(EventArgs)

(Inherited from Control.)

System_CAPS_protmethod OnLoadComplete(EventArgs)

(Inherited from Page.)

System_CAPS_protmethod OnPreInit(EventArgs)

Raises the PreInit event at the beginning of page initialization.(Inherited from ViewPage.)

System_CAPS_protmethod OnPreLoad(EventArgs)

(Inherited from Page.)

System_CAPS_protmethod OnPreRender(EventArgs)

(Inherited from Control.)

System_CAPS_protmethod OnPreRenderComplete(EventArgs)

(Inherited from Page.)

System_CAPS_protmethod OnSaveStateComplete(EventArgs)

(Inherited from Page.)

System_CAPS_protmethod OnUnload(EventArgs)

(Inherited from Control.)

System_CAPS_protmethod OpenFile(String)

(Inherited from Control.)

System_CAPS_pubmethod ParseControl(String)

(Inherited from TemplateControl.)

System_CAPS_pubmethod ParseControl(String, Boolean)

(Inherited from TemplateControl.)

System_CAPS_pubmethod ProcessRequest(HttpContext)

Enables processing of the specified HTTP request by the ASP.NET MVC framework.(Inherited from ViewPage.)

System_CAPS_protmethod RaiseBubbleEvent(Object, EventArgs)

(Inherited from Control.)

System_CAPS_protmethod RaisePostBackEvent(IPostBackEventHandler, String)

(Inherited from Page.)

System_CAPS_pubmethod RegisterArrayDeclaration(String, String)

(Inherited from Page.)

System_CAPS_pubmethod RegisterAsyncTask(PageAsyncTask)

(Inherited from Page.)

System_CAPS_pubmethod RegisterClientScriptBlock(String, String)

(Inherited from Page.)

System_CAPS_pubmethod RegisterHiddenField(String, String)

(Inherited from Page.)

System_CAPS_pubmethod RegisterOnSubmitStatement(String, String)

(Inherited from Page.)

System_CAPS_pubmethod RegisterRequiresControlState(Control)

(Inherited from Page.)

System_CAPS_pubmethod RegisterRequiresPostBack(Control)

(Inherited from Page.)

System_CAPS_pubmethod RegisterRequiresRaiseEvent(IPostBackEventHandler)

(Inherited from Page.)

System_CAPS_pubmethod RegisterRequiresViewStateEncryption()

(Inherited from Page.)

System_CAPS_pubmethod RegisterStartupScript(String, String)

(Inherited from Page.)

System_CAPS_pubmethod RegisterViewStateHandler()

(Inherited from Page.)

System_CAPS_protmethod RemovedControl(Control)

(Inherited from Control.)

System_CAPS_protmethod Render(HtmlTextWriter)

Initializes the HtmlTextWriter object that receives the page content to be rendered.(Inherited from ViewPage.)

System_CAPS_protmethod RenderChildren(HtmlTextWriter)

(Inherited from Control.)

System_CAPS_pubmethod RenderControl(HtmlTextWriter)

(Inherited from Control.)

System_CAPS_protmethod RenderControl(HtmlTextWriter, ControlAdapter)

(Inherited from Control.)

System_CAPS_pubmethod RenderView(ViewContext)

Renders the view page to the response using the specified view context.(Inherited from ViewPage.)

System_CAPS_pubmethod RequiresControlState(Control)

(Inherited from Page.)

System_CAPS_protmethod ResolveAdapter()

(Inherited from Control.)

System_CAPS_pubmethod ResolveClientUrl(String)

(Inherited from Control.)

System_CAPS_pubmethod ResolveUrl(String)

(Inherited from Control.)

System_CAPS_protmethod SaveControlState()

(Inherited from Control.)

System_CAPS_protmethod SavePageStateToPersistenceMedium(Object)

(Inherited from Page.)

System_CAPS_protmethod SaveViewState()

(Inherited from Control.)

System_CAPS_protmethod SetDesignModeState(IDictionary)

(Inherited from Control.)

System_CAPS_pubmethod SetFocus(Control)

(Inherited from Page.)

System_CAPS_pubmethod SetFocus(String)

(Inherited from Page.)

System_CAPS_pubmethod SetRenderMethodDelegate(RenderMethod)

(Inherited from Control.)

System_CAPS_pubmethod 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.)

System_CAPS_protmethod SetViewData(ViewDataDictionary)

Sets the view data dictionary for the associated view.(Overrides ViewPage.SetViewData(ViewDataDictionary).)

System_CAPS_pubmethod TestDeviceFilter(String)

(Inherited from TemplateControl.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_protmethod TrackViewState()

(Inherited from Control.)

System_CAPS_pubmethod TryUpdateModel<TModel>(TModel)

(Inherited from Page.)

System_CAPS_pubmethod TryUpdateModel<TModel>(TModel, IValueProvider)

(Inherited from Page.)

System_CAPS_pubmethod UnregisterRequiresControlState(Control)

(Inherited from Page.)

System_CAPS_pubmethod UpdateModel<TModel>(TModel)

(Inherited from Page.)

System_CAPS_pubmethod UpdateModel<TModel>(TModel, IValueProvider)

(Inherited from Page.)

System_CAPS_pubmethod Validate()

(Inherited from Page.)

System_CAPS_pubmethod Validate(String)

(Inherited from Page.)

System_CAPS_pubmethod VerifyRenderingInServerForm(Control)

(Inherited from Page.)

System_CAPS_protmethod XPath(String)

(Inherited from TemplateControl.)

System_CAPS_protmethod XPath(String, IXmlNamespaceResolver)

(Inherited from TemplateControl.)

System_CAPS_protmethod XPath(String, String)

(Inherited from TemplateControl.)

System_CAPS_protmethod XPath(String, String, IXmlNamespaceResolver)

(Inherited from TemplateControl.)

System_CAPS_protmethod XPathSelect(String)

(Inherited from TemplateControl.)

System_CAPS_protmethod XPathSelect(String, IXmlNamespaceResolver)

(Inherited from TemplateControl.)

Events

Name Description
System_CAPS_pubevent AbortTransaction

(Inherited from TemplateControl.)

System_CAPS_pubevent CommitTransaction

(Inherited from TemplateControl.)

System_CAPS_pubevent DataBinding

(Inherited from Control.)

System_CAPS_pubevent Disposed

(Inherited from Control.)

System_CAPS_pubevent Error

(Inherited from TemplateControl.)

System_CAPS_pubevent Init

(Inherited from Control.)

System_CAPS_pubevent InitComplete

(Inherited from Page.)

System_CAPS_pubevent Load

(Inherited from Control.)

System_CAPS_pubevent LoadComplete

(Inherited from Page.)

System_CAPS_pubevent PreInit

(Inherited from Page.)

System_CAPS_pubevent PreLoad

(Inherited from Page.)

System_CAPS_pubevent PreRender

(Inherited from Control.)

System_CAPS_pubevent PreRenderComplete

(Inherited from Page.)

System_CAPS_pubevent SaveStateComplete

(Inherited from Page.)

System_CAPS_pubevent Unload

(Inherited from Control.)

Explicit Interface Implementations

Name Description
System_CAPS_pubinterfaceSystem_CAPS_privmethod IControlDesignerAccessor.GetDesignModeState()

(Inherited from Control.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IControlDesignerAccessor.SetDesignModeState(IDictionary)

(Inherited from Control.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IControlDesignerAccessor.SetOwnerControl(Control)

(Inherited from Control.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IFilterResolutionService.CompareFilters(String, String)

(Inherited from TemplateControl.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IFilterResolutionService.EvaluateFilter(String)

(Inherited from TemplateControl.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IParserAccessor.AddParsedSubObject(Object)

(Inherited from Control.)

Remarks

The ViewPage class is used by the default view engine (WebFormViewEngine) to render a view as a Web Forms (.aspx) page.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

System.Web.Mvc Namespace

Return to top