asp.net后台控制HtmlMeta
时间:2011-04-09 来源:枫-
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 = productInfoModel.P_Desc;
Page.Header.Controls.Add(desc);
//Keyword
HtmlMeta keywords = new HtmlMeta();
keywords.Name = "keywords";
keywords.Content = productInfoModel.P_Key;
Page.Header.Controls.Add(keywords);