Edit

Share via


Page.MetaKeywords Property

Definition

Gets or sets the content of the "keywords" meta element.

public:
 property System::String ^ MetaKeywords { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Bindable(true)]
public string MetaKeywords { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.MetaKeywords : string with get, set
Public Property MetaKeywords As String

Property Value

The content of the "keywords" 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 MetaKeywords property of a page to "HTML,CSS,XML,JavaScript", the following element will appear in the rendered HTML:

<meta name="keywords" content=" HTML,CSS,XML,JavaScript" />

Remarks

HTML meta elements can be used to improve search-engine listings. The "keywords" meta element is either not used at all or is given very little weight by the major search engines.

If there is no "keywords" 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 "keywords" meta element, this property gets or sets the content attribute of the meta element.

You can also set this property in the @ Page directive.

Applies to

See also