Code1System.Web.UI.HtmlControls.HtmlGenericControl control = new HtmlGenericControl("link");2 control.Attributes.Add("type", "text/css");3 control.Attributes.Add("rel", "stylesheet");4 control.Attributes.Add("href", "style.css");5 Page.Header.Controls.Add(control); 转载于:https://www.cnblogs.com/dotneter/archive/2009/06/17/1504966.html