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 | |
---|---|---|
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 | |
---|---|---|
App | Gets the application-state data as a DynamicObject object that callers can use to create and access custom application-scoped properties. | |
AppState | Gets a reference to global application-state data that can be shared across sessions and requests in an ASP.NET application. | |
Cache | Gets the cache object for the current application domain. | |
Context | Gets the HttpContextBase object that is associated with a page. | |
CurrentPage | Gets the current page for this helper page. | |
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. | |
Html | Gets the HtmlHelper object that is associated with a page. | |
IsAjax | Gets a value that indicates whether Ajax is being used during the request of the web page. | |
IsPost | Gets a value that indicates whether the current request is a post (submitted using the HTTP POST verb). | |
Model | Gets the model that is associated with a page. | |
ModelState | Gets the state data for the model that is associated with a page. | |
Page | Gets property-like access to page data that is shared between pages, layout pages, and partial pages. | |
PageContext | Gets and sets the HTTP context for the web page. | |
PageData | Gets array-like access to page data that is shared between pages, layout pages, and partial pages. | |
Request | Gets the HttpRequest object for the current HTTP request. | |
Response | Gets the HttpResponse object for the current HTTP response. | |
Server | Gets the HttpServerUtility object that provides methods that can be used as part of web-page processing. | |
Session | Gets the HttpSessionState object for the current HTTP request. | |
UrlData | Gets data related to the URL path. | |
User | Gets a user value based on the HTTP context. | |
VirtualPath | Gets the virtual path of the page. |
Top
Methods
Name | Description | |
---|---|---|
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. | |
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. | |
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. | |
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. | |
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
Href | Builds an absolute URL from an application-relative URL by using the specified parameters. | |
MemberwiseClone | (Inherited from Object.) | |
ToString | (Inherited from Object.) | |
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. | |
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. | |
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. | |
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. | |
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, 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.