The recommended simple practices are as follows:
protected void Page_Load (object sender, EventArgs e)
{
Page Title
Page.title = "This is a Title and Meta test page.";
Encode/content type
Htmlmeta encode = new Htmlmeta ();
Encode. HTTPEQUIV = "Content-type";
Encode. Content = "text/html; Charset=utf-8 ";
PAGE.HEADER.CONTROLS.ADD (encode);
Language
Htmlmeta lang = new Htmlmeta ();
Lang. HTTPEQUIV = "Content-language";
Lang. Content = "ZH-CN";
Page.Header.Controls.Add (lang);
Description
Htmlmeta desc = new Htmlmeta ();
Desc. Name = "Description";
Desc. Content = "Test the meta controls";
PAGE.HEADER.CONTROLS.ADD (DESC);
Keyword
Htmlmeta keywords = new Htmlmeta ();
Keywords. Name = "keywords";
Keywords. Content = "Title,meta,test,page";
PAGE.HEADER.CONTROLS.ADD (keywords);
Link/css
Htmllink Csslink = new Htmllink ();
Csslink.href = "Masterpage.css";
CSSLINK.ATTRIBUTES.ADD ("rel", "stylesheet");
CSSLINK.ATTRIBUTES.ADD ("type", "text/css");
PAGE.HEADER.CONTROLS.ADD (Csslink);
}
ASP. Dynamic Settings Title title Keyword Keywords Description descrtptions