Export (0) Print
Expand All

HtmlMeta Class

Allows programmatic access to the HTML <meta> tag on the server.

Namespace: System.Web.UI.HtmlControls
Assembly: System.Web (in system.web.dll)

public ref class HtmlMeta : public HtmlControl
public class HtmlMeta extends HtmlControl
public class HtmlMeta extends HtmlControl
Not applicable.

The HtmlMeta control provides programmatic access to the HTML <meta> element on the server. The HTML <meta> element is a container for data about the rendered page, but not page content itself. The <meta> tag is placed between the opening and closing HTML <head> elements. Each <meta> element describes a metadata property name and its associated value.

Use the HtmlMeta control's Name property to specify the metadata property name, and the Content property to specify the metadata property value. Use the Scheme property to specify additional information to user agents on how to interpret the metadata property. Use the HttpEquiv property in place of the Name property when the resulting metadata property will be retrieved using HTTP.

You can get a reference to the page <head> element using the Header property of the Page object.

The following code example demonstrates how to use the HtmlMeta control to define HTML <meta> elements for a Web page. Two <meta> elements are defined, one listing keywords describing the page and one listing the date the page was created.

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

System.Object
   System.Web.UI.Control
     System.Web.UI.HtmlControls.HtmlControl
      System.Web.UI.HtmlControls.HtmlMeta

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

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft