Method called by asp.net to dynamically add style sheets in the back end

  • 2021-06-28 12:22:39
  • OfStack

This article shows an example of how asp.net dynamically adds style sheet calls in the back end.Share it for your reference.The implementation is as follows:


HtmlLink CssControl = new HtmlLink();
CssControl.Href = url;
CssControl.Attributes.Add("rel", "stylesheet");
CssControl.Attributes.Add("type", "text/css");
page.Header.Controls.Add(CssControl);

I hope that the description in this paper will be helpful to everyone's asp.net program design.


Related articles: