ASP.NET load Stylesheet dynamically with no duplicate(blog.ysatech.com)
submitted by
bryiantan(115) 2 years, 8 months ago
I have an ASP.NET WebUserControl that requires a CSS Stylesheet to display correctly. My goal is to not include the CSS stylesheet in any of my Page or Masterpage whenever I consume the WebUserControl. All I want to do is just drag and drop one or more of the WebUserControl on to my page and I'm good to go. I can solve this maze by loading the CSS stylesheet in my user WebUserControl dynamically. But it will load duplicates CSS on my page if I have more than one of the identical WebUserControl. If you happen to come across into this kind of situation, here is the solution on how to prevent loading duplicate CSS stylesheet on your page. It works for me, comments are welcome.
|category: C#
|Views: 27
tags:
C# another
Everyones tags:
Your Tags: