ViewPage Class

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

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>

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

Syntax

'Declaration
Public Class ViewPage _
    Inherits Page _
    Implements IViewDataContainer
'Usage
Dim instance As ViewPage
public class ViewPage : Page, IViewDataContainer
public ref class ViewPage : public Page, 
    IViewDataContainer
public class ViewPage extends Page implements IViewDataContainer

The ViewPage type exposes the following members.

Constructors

  Name Description
Public method ViewPage Initializes a new instance of the ViewPage class.

Top

Properties

  Name Description
Protected property Adapter (Inherited from Control.)
Public property Ajax Gets or sets the AjaxHelper object that is used to render HTML in Ajax scenarios.
Public property Application (Inherited from Page.)
Public property AppRelativeTemplateSourceDirectory (Inherited from Control.)
Public property AppRelativeVirtualPath (Inherited from TemplateControl.)
Protected property AspCompatMode (Inherited from Page.)
Protected property AsyncMode (Inherited from Page.)
Public property AsyncTimeout (Inherited from Page.)
Protected property AutoHandlers Obsolete. (Inherited from TemplateControl.)
Public property AutoPostBackControl (Inherited from Page.)
Public property BindingContainer (Inherited from Control.)
Public property Buffer (Inherited from Page.)
Public property Cache (Inherited from Page.)
Protected property ChildControlsCreated (Inherited from Control.)
Public property ClientID (Inherited from Control.)
Public property ClientIDMode (Inherited from Control.)
Protected property ClientIDSeparator (Inherited from Control.)
Public property ClientQueryString (Inherited from Page.)
Public property ClientScript (Inherited from Page.)
Public property ClientTarget (Inherited from Page.)
Public property CodePage (Inherited from Page.)
Public property ContentType (Inherited from Page.)
Protected property Context (Inherited from Page.)
Public property Controls (Inherited from Control.)
Public property Culture (Inherited from Page.)
Public property DataItemContainer (Inherited from Control.)
Public property DataKeysContainer (Inherited from Control.)
Protected property DesignMode (Inherited from Control.)
Public property EnableEventValidation (Inherited from Page.)
Public property EnableTheming (Inherited from TemplateControl.)
Public property EnableViewState (Inherited from Page.)
Public property EnableViewStateMac (Inherited from Page.)
Public property ErrorPage (Inherited from Page.)
Protected property Events (Inherited from Control.)
Protected property FileDependencies Obsolete. (Inherited from Page.)
Public property Form (Inherited from Page.)
Protected property HasChildViewState (Inherited from Control.)
Public property Header (Inherited from Page.)
Public property Html Gets or sets the HtmlHelper object that is used to render HTML elements.
Public property ID (Inherited from Page.)
Public property IdSeparator (Inherited from Page.)
Public property IsAsync (Inherited from Page.)
Public property IsCallback (Inherited from Page.)
Protected property IsChildControlStateCleared (Inherited from Control.)
Public property IsCrossPagePostBack (Inherited from Page.)
Public property IsPostBack (Inherited from Page.)
Public property IsPostBackEventControlRegistered (Inherited from Page.)
Public property IsReusable (Inherited from Page.)
Protected property IsTrackingViewState (Inherited from Control.)
Public property IsValid (Inherited from Page.)
Protected property IsViewStateEnabled (Inherited from Control.)
Public property Items (Inherited from Page.)
Public property LCID (Inherited from Page.)
Protected property LoadViewStateByID (Inherited from Control.)
Public property MaintainScrollPositionOnPostBack (Inherited from Page.)
Public property Master (Inherited from Page.)
Public property MasterLocation Gets or sets the path of the master view.
Public property MasterPageFile (Inherited from Page.)
Public property MaxPageStateFieldLength (Inherited from Page.)
Public property MetaDescription (Inherited from Page.)
Public property MetaKeywords (Inherited from Page.)
Public property Model Gets the Model property of the associated ViewDataDictionary object.
Public property NamingContainer (Inherited from Control.)
Public property Page (Inherited from Control.)
Public property PageAdapter (Inherited from Page.)
Protected property PageStatePersister (Inherited from Page.)
Public property Parent (Inherited from Control.)
Public property PreviousPage (Inherited from Page.)
Public property RenderingCompatibility (Inherited from Control.)
Public property Request (Inherited from Page.)
Public property Response (Inherited from Page.)
Public property ResponseEncoding (Inherited from Page.)
Public property RouteData (Inherited from Page.)
Public property Server (Inherited from Page.)
Public property Session (Inherited from Page.)
Public property Site (Inherited from Control.)
Public property SkinID (Inherited from Control.)
Public property SmartNavigation Obsolete. (Inherited from Page.)
Public property StyleSheetTheme (Inherited from Page.)
Protected property SupportAutoEvents (Inherited from TemplateControl.)
Public property TempData Gets the temporary data to pass to the view.
Public property TemplateControl (Inherited from Control.)
Public property TemplateSourceDirectory (Inherited from Control.)
Public property Theme (Inherited from Page.)
Public property Title (Inherited from Page.)
Public property Trace (Inherited from Page.)
Public property TraceEnabled (Inherited from Page.)
Public property TraceModeValue (Inherited from Page.)
Protected property TransactionMode (Inherited from Page.)
Public property UICulture (Inherited from Page.)
Protected property UniqueFilePathSuffix (Inherited from Page.)
Public property UniqueID (Inherited from Control.)
Public property Url Gets or sets the URL of the rendered page.
Public property User (Inherited from Page.)
Public property Validators (Inherited from Page.)
Public property ViewBag Gets the view bag.
Public property ViewContext Gets or sets the information that is used to render the view.
Public property ViewData Gets or sets a dictionary that contains data to pass between the controller and the view.
Protected property ViewState (Inherited from Control.)
Public property ViewStateEncryptionMode (Inherited from Page.)
Protected property ViewStateIgnoresCase (Inherited from Control.)
Public property ViewStateMode (Inherited from Control.)
Public property ViewStateUserKey (Inherited from Page.)
Public property Visible (Inherited from Page.)
Public property Writer Gets the text writer that is used to render the view to the response.

Top

Methods

  Name Description
Protected method AddContentTemplate (Inherited from Page.)
Protected method AddedControl (Inherited from Control.)
Public method AddOnPreRenderCompleteAsync(BeginEventHandler, EndEventHandler) (Inherited from Page.)
Public method AddOnPreRenderCompleteAsync(BeginEventHandler, EndEventHandler, Object) (Inherited from Page.)
Protected method AddParsedSubObject (Inherited from Control.)
Protected method AddWrappedFileDependencies (Inherited from Page.)
Public method ApplyStyleSheetSkin (Inherited from Control.)
Protected method AspCompatBeginProcessRequest (Inherited from Page.)
Protected method AspCompatEndProcessRequest (Inherited from Page.)
Protected method AsyncPageBeginProcessRequest (Inherited from Page.)
Protected method AsyncPageEndProcessRequest (Inherited from Page.)
Protected method BuildProfileTree (Inherited from Control.)
Protected method ClearCachedClientID (Inherited from Control.)
Protected method ClearChildControlState (Inherited from Control.)
Protected method ClearChildState (Inherited from Control.)
Protected method ClearChildViewState (Inherited from Control.)
Protected method ClearEffectiveClientIDMode (Inherited from Control.)
Protected method Construct (Inherited from TemplateControl.)
Protected method CreateChildControls (Inherited from Control.)
Protected method CreateControlCollection (Inherited from Control.)
Protected method CreateHtmlTextWriter (Inherited from Page.)
Protected method CreateResourceBasedLiteralControl (Inherited from TemplateControl.)
Public method DataBind() (Inherited from Control.)
Protected method DataBind(Boolean) (Inherited from Control.)
Protected method DataBindChildren (Inherited from Control.)
Public method DesignerInitialize (Inherited from Page.)
Protected method DeterminePostBackMode (Inherited from Page.)
Public method Dispose (Inherited from Control.)
Protected method EnsureChildControls (Inherited from Control.)
Protected method EnsureID (Inherited from Control.)
Public method Equals (Inherited from Object.)
Protected method Eval(String) (Inherited from TemplateControl.)
Protected method Eval(String, String) (Inherited from TemplateControl.)
Public method ExecuteRegisteredAsyncTasks (Inherited from Page.)
Protected method Finalize (Inherited from Object.)
Public method FindControl(String) (Inherited from Page.)
Protected method FindControl(String, Int32) (Inherited from Control.)
Public method Focus (Inherited from Control.)
Protected method FrameworkInitialize (Inherited from Page.)
Public method GetDataItem (Inherited from Page.)
Protected method GetDesignModeState (Inherited from Control.)
Protected method GetGlobalResourceObject(String, String) (Inherited from TemplateControl.)
Protected method GetGlobalResourceObject(String, String, Type, String) (Inherited from TemplateControl.)
Public method GetHashCode (Inherited from Object.)
Protected method GetLocalResourceObject(String) (Inherited from TemplateControl.)
Protected method GetLocalResourceObject(String, Type, String) (Inherited from TemplateControl.)
Public method GetPostBackClientEvent Obsolete. (Inherited from Page.)
Public method GetPostBackClientHyperlink Obsolete. (Inherited from Page.)
Public method GetPostBackEventReference(Control) Obsolete. (Inherited from Page.)
Public method GetPostBackEventReference(Control, String) Obsolete. (Inherited from Page.)
Public method GetRouteUrl(Object) (Inherited from Control.)
Public method GetRouteUrl(RouteValueDictionary) (Inherited from Control.)
Public method GetRouteUrl(String, Object) (Inherited from Control.)
Public method GetRouteUrl(String, RouteValueDictionary) (Inherited from Control.)
Public method GetType (Inherited from Object.)
Public method GetTypeHashCode (Inherited from Page.)
Public method GetUniqueIDRelativeTo (Inherited from Control.)
Public method GetValidators (Inherited from Page.)
Protected method GetWrappedFileDependencies (Inherited from Page.)
Public method HasControls (Inherited from Control.)
Protected method HasEvents (Inherited from Control.)
Public method InitHelpers Initializes the Ajax, Html, and Url properties.
Protected method InitializeCulture (Inherited from Page.)
Protected method InitOutputCache(OutputCacheParameters) (Inherited from Page.)
Protected method InitOutputCache(Int32, String, String, OutputCacheLocation, String) (Inherited from Page.)
Protected method InitOutputCache(Int32, String, String, String, OutputCacheLocation, String) (Inherited from Page.)
Public method IsClientScriptBlockRegistered Obsolete. (Inherited from Page.)
Protected method IsLiteralContent (Inherited from Control.)
Public method IsStartupScriptRegistered Obsolete. (Inherited from Page.)
Public method LoadControl(String) (Inherited from TemplateControl.)
Public method LoadControl(Type, array<Object[]) (Inherited from TemplateControl.)
Protected method LoadControlState (Inherited from Control.)
Protected method LoadPageStateFromPersistenceMedium (Inherited from Page.)
Public method LoadTemplate (Inherited from TemplateControl.)
Protected method LoadViewState (Inherited from Control.)
Public method MapPath (Inherited from Page.)
Protected method MapPathSecure (Inherited from Control.)
Protected method MemberwiseClone (Inherited from Object.)
Protected method OnAbortTransaction (Inherited from TemplateControl.)
Protected method OnBubbleEvent (Inherited from Control.)
Protected method OnCommitTransaction (Inherited from TemplateControl.)
Protected method OnDataBinding (Inherited from Control.)
Protected method OnError (Inherited from TemplateControl.)
Protected method OnInit (Inherited from Page.)
Protected method OnInitComplete (Inherited from Page.)
Protected method OnLoad (Inherited from Control.)
Protected method OnLoadComplete (Inherited from Page.)
Protected method OnPreInit Raises the PreInit event at the beginning of page initialization. (Overrides Page.OnPreInit(EventArgs).)
Protected method OnPreLoad (Inherited from Page.)
Protected method OnPreRender (Inherited from Control.)
Protected method OnPreRenderComplete (Inherited from Page.)
Protected method OnSaveStateComplete (Inherited from Page.)
Protected method OnUnload (Inherited from Control.)
Protected method OpenFile (Inherited from Control.)
Public method ParseControl(String) (Inherited from TemplateControl.)
Public method ParseControl(String, Boolean) (Inherited from TemplateControl.)
Public method ProcessRequest Enables processing of the specified HTTP request by the ASP.NET MVC framework. (Overrides Page.ProcessRequest(HttpContext).)
Protected method RaiseBubbleEvent (Inherited from Control.)
Protected method RaisePostBackEvent (Inherited from Page.)
Public method ReadStringResource (Inherited from TemplateControl.)
Public method RegisterArrayDeclaration Obsolete. (Inherited from Page.)
Public method RegisterAsyncTask (Inherited from Page.)
Public method RegisterClientScriptBlock Obsolete. (Inherited from Page.)
Public method RegisterHiddenField Obsolete. (Inherited from Page.)
Public method RegisterOnSubmitStatement Obsolete. (Inherited from Page.)
Public method RegisterRequiresControlState (Inherited from Page.)
Public method RegisterRequiresPostBack (Inherited from Page.)
Public method RegisterRequiresRaiseEvent (Inherited from Page.)
Public method RegisterRequiresViewStateEncryption (Inherited from Page.)
Public method RegisterStartupScript Obsolete. (Inherited from Page.)
Public method RegisterViewStateHandler (Inherited from Page.)
Protected method RemovedControl (Inherited from Control.)
Protected method Render Initializes the HtmlTextWriter object that receives the page content to be rendered. (Overrides Page.Render(HtmlTextWriter).)
Protected method RenderChildren (Inherited from Control.)
Public method RenderControl(HtmlTextWriter) (Inherited from Control.)
Protected method RenderControl(HtmlTextWriter, ControlAdapter) (Inherited from Control.)
Public method RenderView Renders the view page to the response using the specified view context.
Public method RequiresControlState (Inherited from Page.)
Protected method ResolveAdapter (Inherited from Control.)
Public method ResolveClientUrl (Inherited from Control.)
Public method ResolveUrl (Inherited from Control.)
Protected method SaveControlState (Inherited from Control.)
Protected method SavePageStateToPersistenceMedium (Inherited from Page.)
Protected method SaveViewState (Inherited from Control.)
Protected method SetDesignModeState (Inherited from Control.)
Public method SetFocus(Control) (Inherited from Page.)
Public method SetFocus(String) (Inherited from Page.)
Public method SetRenderMethodDelegate (Inherited from Control.)
Protected method SetStringResourcePointer (Inherited from TemplateControl.)
Public method SetTextWriter Obsolete. Sets the text writer that is used to render the view to the response.
Protected method SetViewData Sets the view data dictionary for the associated view.
Public method TestDeviceFilter (Inherited from TemplateControl.)
Public method ToString (Inherited from Object.)
Protected method TrackViewState (Inherited from Control.)
Public method UnregisterRequiresControlState (Inherited from Page.)
Public method Validate() (Inherited from Page.)
Public method Validate(String) (Inherited from Page.)
Public method VerifyRenderingInServerForm (Inherited from Page.)
Protected method WriteUTF8ResourceString (Inherited from TemplateControl.)
Protected method XPath(String) (Inherited from TemplateControl.)
Protected method XPath(String, IXmlNamespaceResolver) (Inherited from TemplateControl.)
Protected method XPath(String, String) (Inherited from TemplateControl.)
Protected method XPath(String, String, IXmlNamespaceResolver) (Inherited from TemplateControl.)
Protected method XPathSelect(String) (Inherited from TemplateControl.)
Protected method XPathSelect(String, IXmlNamespaceResolver) (Inherited from TemplateControl.)

Top

Events

  Name Description
Public event AbortTransaction (Inherited from TemplateControl.)
Public event CommitTransaction (Inherited from TemplateControl.)
Public event DataBinding (Inherited from Control.)
Public event Disposed (Inherited from Control.)
Public event Error (Inherited from TemplateControl.)
Public event Init (Inherited from Control.)
Public event InitComplete (Inherited from Page.)
Public event Load (Inherited from Control.)
Public event LoadComplete (Inherited from Page.)
Public event PreInit (Inherited from Page.)
Public event PreLoad (Inherited from Page.)
Public event PreRender (Inherited from Control.)
Public event PreRenderComplete (Inherited from Page.)
Public event SaveStateComplete (Inherited from Page.)
Public event Unload (Inherited from Control.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IParserAccessor.AddParsedSubObject (Inherited from Control.)
Explicit interface implemetationPrivate method IFilterResolutionService.CompareFilters (Inherited from TemplateControl.)
Explicit interface implemetationPrivate property IControlBuilderAccessor.ControlBuilder (Inherited from Control.)
Explicit interface implemetationPrivate property IDataBindingsAccessor.DataBindings (Inherited from Control.)
Explicit interface implemetationPrivate method IFilterResolutionService.EvaluateFilter (Inherited from TemplateControl.)
Explicit interface implemetationPrivate property IExpressionsAccessor.Expressions (Inherited from Control.)
Explicit interface implemetationPrivate method IControlDesignerAccessor.GetDesignModeState (Inherited from Control.)
Explicit interface implemetationPrivate property IDataBindingsAccessor.HasDataBindings (Inherited from Control.)
Explicit interface implemetationPrivate property IExpressionsAccessor.HasExpressions (Inherited from Control.)
Explicit interface implemetationPrivate method IControlDesignerAccessor.SetDesignModeState (Inherited from Control.)
Explicit interface implemetationPrivate method IControlDesignerAccessor.SetOwnerControl (Inherited from Control.)
Explicit interface implemetationPrivate property IControlDesignerAccessor.UserData (Inherited from Control.)

Top

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

Reference

System.Web.Mvc Namespace

Other Resources

Views and UI Rendering in ASP.NET MVC Applications