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.

System.Object
  System.Web.WebPages.HelperPage

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

public class HelperPage

The HelperPage type exposes the following members.

  NameDescription
Public methodHelperPageThis 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

  NameDescription
Public propertyStatic memberAppGets the application-state data as a DynamicObject object that callers can use to create and access custom application-scoped properties.
Public propertyStatic memberAppStateGets a reference to global application-state data that can be shared across sessions and requests in an ASP.NET application.
Public propertyStatic memberCacheGets the cache object for the current application domain.
Public propertyStatic memberContextGets the HttpContextBase object that is associated with a page.
Public propertyStatic memberCurrentPageGets the current page for this helper page.
Protected propertyStatic memberHelperVirtualPathThis 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 memberHtmlGets the HtmlHelper object that is associated with a page.
Public propertyStatic memberIsAjaxGets a value that indicates whether Ajax is being used during the request of the web page.
Public propertyStatic memberIsPostGets a value that indicates whether the current request is a post (submitted using the HTTP POST verb).
Public propertyStatic memberModelGets the model that is associated with a page.
Public propertyStatic memberModelStateGets the state data for the model that is associated with a page.
Public propertyStatic memberPageGets property-like access to page data that is shared between pages, layout pages, and partial pages.
Public propertyStatic memberPageContextGets and sets the HTTP context for the web page.
Public propertyStatic memberPageDataGets array-like access to page data that is shared between pages, layout pages, and partial pages.
Public propertyStatic memberRequestGets the HttpRequest object for the current HTTP request.
Public propertyStatic memberResponseGets the HttpResponse object for the current HTTP response.
Public propertyStatic memberServerGets the HttpServerUtility object that provides methods that can be used as part of web-page processing.
Public propertyStatic memberSessionGets the HttpSessionState object for the current HTTP request.
Public propertyStatic memberUrlDataGets data related to the URL path.
Public propertyStatic memberUserGets a user value based on the HTTP context.
Public propertyStatic memberVirtualPathGets the virtual path of the page.
Top

  NameDescription
Public methodStatic memberBeginContext(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 memberBeginContext(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 memberEndContext(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 memberEndContext(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 methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodStatic memberHrefBuilds an absolute URL from an application-relative URL by using the specified parameters.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Public methodStatic memberWriteAttributeToThis 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 memberWriteLiteralTo(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 memberWriteLiteralTo(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 memberWriteTo(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 memberWriteTo(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

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.

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