////// 添加关键字以及描述 /// /// 关键字 /// 描述 /// Page public static void addMeta(string key, string des, System.Web.UI.Page page) { Literal keywords = new Literal(), description = new Literal(); keywords.Text = " "; description.Text = " "; page.Header.Controls.Add(keywords); page.Header.Controls.Add(description); } ////// 读取某网页的关键字或描述 /// /// 链接地址(http://www.baidu.com) /// 所要读取的类别 ///public static string setMeta(string url, string Type) { using (System.Net.WebClient wc = new System.Net.WebClient()) { string html = wc.DownloadString(url); int sp = html.IndexOf("name=" + Type); int se = html.IndexOf("\">", sp); html = html.Substring(sp, se - sp); sp = html.IndexOf("\"") + 1; return html.Substring(sp); } }