We know that meta tags serve as response header packets used to simulate the HTTP protocol. there are many places to use, and there are already many online summaries. Here we will not list them one by one, for example, description (the description of the site on the search engine), keywords (classification keyword ), and http-equiv are added to the Master page to perform Code operations:
1. Generally, you can use the Page. Header attribute to obtain or set the value of the server-side Master 2. Declare the HtmlMeta type and set the corresponding attribute value.
3. register the meta to the Master using the Controls. Add method of Page. Header.
For example:
HtmlMeta metadeworkflow = new HtmlMeta ();
Metadeworkflow. Name = "DESCRIPTION ";
Metadeworkflow. Content = "my description ";
Page. Header. Controls. Add (metadeworkflow );
The HTML code is:
<Meta name = "DESCRIPTION" content = "my DESCRIPTION"/>
Another important attribute is http-equiv. For example, you can refresh a webpage every 2 seconds:
HtmlMeta metadeworkflow = new HtmlMeta ();
Metadegion. HttpEquiv = "Refresh ";
Metadeworkflow. Content = "2 ";
Page. Header. Controls. Add (metadeworkflow );
HTML code:
<Meta http-equiv = "Refresh" content = "2"/>
Of course, we can also specify the character set and GMT time format.