Export (0) Print
Expand All
Expand Minimize

Page.Header Property

Gets the document header for the page if the head element is defined with a runat=server in the page declaration.

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

[<BrowsableAttribute(false)>]
member Header : HtmlHead with get

Property Value

Type: System.Web.UI.HtmlControls.HtmlHead
An HtmlHead containing the page header.

The Header property gets a reference to an HtmlHead object that you can use to set document header information for the page. The HtmlHead allows you to add information such as style sheets, style rules, a title, and metadata to the head element.

NoteNote

Adding styles programmatically using the methods of the IStyleSheet interface during asynchronous postbacks is not supported. When you add AJAX capabilities to a Web page, asynchronous postbacks update regions of the page without updating the whole page. For more information, see Microsoft Ajax Overview.

The following code example demonstrates how to access the HtmlHead control programmatically using the Header property. A title element and style element are added to the head element of the page.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft