Page.MetaDescription Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the content of the "description" meta
element.
public:
property System::String ^ MetaDescription { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Bindable(true)]
public string MetaDescription { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.MetaDescription : string with get, set
Public Property MetaDescription As String
Property Value
The content of the "description" meta
element.
- Attributes
Exceptions
The page does not have a header control (a head
element with the runat
attribute set to "server").
Examples
If you set the MetaDescription property of a page to "ASP.NET Overview", the following element will appear in the rendered HTML:
<meta name="description" content="ASP.NET Overview" />
Remarks
HTML meta
elements can be used to improve search-engine listings. The "description" meta
element is used by some search engines to improve listing previews.
If there is no "description" meta
element in the head
element of the page markup, the meta
element is added to the page when the page is rendered. If the page markup already has a "description" meta
element, this property gets or sets the content
attribute of the meta
element.
You can also set this property in the @ Page directive.