HtmlTitle Class
.NET Framework 2.0
Note: This class is new in the .NET Framework version 2.0.
Allows programmatic access to the HTML <title> element on the server.
Namespace: System.Web.UI.HtmlControls
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
The following code example demonstrates how to display the current date and time in the title bar of the Web page.
<%@ Page Language="C#" %> <script runat="server"> void Page_Load(object sender, EventArgs e) { if (Page.Header != null) { Page.Header.Title = "Welcome! The time is: " + System.DateTime.Now; } } </script> <html> <head id="Head1" runat="server"> </head> <body> <form id="form1" runat="server"> <h3>HtmlTitle Example</h3> </form> </body> </html>
- AspNetHostingPermission for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
- AspNetHostingPermission for operating in a hosted environment. Demand value: InheritanceDemand; Permission value: Minimal.
System.Object
System.Web.UI.Control
System.Web.UI.HtmlControls.HtmlControl
System.Web.UI.HtmlControls.HtmlTitle
System.Web.UI.Control
System.Web.UI.HtmlControls.HtmlControl
System.Web.UI.HtmlControls.HtmlTitle
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Note