HelperPage Class

Represents a base class for pages that is used when ASP.NET compiles a .cshtml or .vbhtml file and that exposes page-level and application-level properties and methods.

Inheritance Hierarchy

System.Object
  System.Web.WebPages.HelperPage

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

Syntax

'Declaration
Public Class HelperPage
'Usage
Dim instance As HelperPage
public class HelperPage
public ref class HelperPage
type HelperPage =  class end
public class HelperPage

The HelperPage type exposes the following members.

Constructors

  Name Description
Public method HelperPage This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Initializes a new instance of the HelperPage class.

Top

Properties

  Name Description
Public propertyStatic member App Gets the application-state data as a DynamicObject object that callers can use to create and access custom application-scoped properties.
Public propertyStatic member AppState Gets a reference to global application-state data that can be shared across sessions and requests in an ASP.NET application.
Public propertyStatic member Cache Gets the cache object for the current application domain.
Public propertyStatic member Context Gets the HttpContextBase object that is associated with a page.
Public propertyStatic member CurrentPage Gets the current page for this helper page.
Protected propertyStatic member HelperVirtualPath This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets or sets the path of the helper page.
Public propertyStatic member Html Gets the HtmlHelper object that is associated with a page.
Public propertyStatic member IsAjax Gets a value that indicates whether Ajax is being used during the request of the web page.
Public propertyStatic member IsPost Gets a value that indicates whether the current request is a post (submitted using the HTTP POST verb).
Public propertyStatic member Model Gets the model that is associated with a page.
Public propertyStatic member ModelState Gets the state data for the model that is associated with a page.
Public propertyStatic member Page Gets property-like access to page data that is shared between pages, layout pages, and partial pages.
Public propertyStatic member PageContext Gets and sets the HTTP context for the web page.
Public propertyStatic member PageData Gets array-like access to page data that is shared between pages, layout pages, and partial pages.
Public propertyStatic member Request Gets the HttpRequest object for the current HTTP request.
Public propertyStatic member Response Gets the HttpResponse object for the current HTTP response.
Public propertyStatic member Server Gets the HttpServerUtility object that provides methods that can be used as part of web-page processing.
Public propertyStatic member Session Gets the HttpSessionState object for the current HTTP request.
Public propertyStatic member UrlData Gets data related to the URL path.
Public propertyStatic member User Gets a user value based on the HTTP context.
Public propertyStatic member VirtualPath Gets the virtual path of the page.

Top

Methods

  Name Description
Public methodStatic member BeginContext(String, Int32, Int32, Boolean) This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Puts all the helper statements into the context of the helper page.
Public methodStatic member BeginContext(TextWriter, String, Int32, Int32, Boolean) This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Puts all the helper statements into the context of the helper page.
Public methodStatic member EndContext(String, Int32, Int32, Boolean) This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Indicates the end of context block.
Public methodStatic member EndContext(TextWriter, String, Int32, Int32, Boolean) This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Indicates the end of context block.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public methodStatic member Href Builds an absolute URL from an application-relative URL by using the specified parameters.
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)
Public methodStatic member WriteAttributeTo This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Writes an attribute associated with the helper.
Public methodStatic member WriteLiteralTo(TextWriter, Object) This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Writes a literal object to the helper.
Public methodStatic member WriteLiteralTo(TextWriter, HelperResult) This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Writes a helper result object to the helper.
Public methodStatic member WriteTo(TextWriter, Object) This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Writes an object to the helper.
Public methodStatic member WriteTo(TextWriter, HelperResult) This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Writes a helper result object to the helper.

Top

Remarks

This class defines certain members (like Context, AppState, and Href(String, array<Object[])) that can be used in ASP.NET Web Pages as properties of the page.

All methods and properties in the HelperPage class are static, so all methods and properties that access this class must also be static.

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.WebPages Namespace