Is there a ClientScriptManager.RegisterClientScriptInclude equivalent for CSS

Question :

Is there a ClientScriptManager.RegisterClientScriptInclude equivalent for CSS,

Answer :

The  method allows you to register a JavaScript reference with the Page object (checking for duplicates).

Is there an equivalent of this method for CSS references?

Similar questions apply for  and

,

Short answer: no. You could certainly roll your own functions (as CMPalmer suggests) to take CSS embedded resources (as Gulzar suggests) and embed them on the page.

As a best-practice matter, though, I’m not sure why you would want to do this. If you’re making a reusable control that has a lot of CSS styling, my advice would be to just hard-code the class names into the standards-compliant output of your control, and ship the control accompanied by a suggested stylesheet. This gives your users/customers the option of overriding your suggested styles to fit their needs, and in general allows them to manage their CSS setup as they see fit.

Read More  Anyone know of an on-line free database?

Separating style from markup is a Good Thing – you’re already headed down the right path in avoiding the various built-in ASP.NET style attributes, but you should take it all the way and keep the CSS out of your .dll.

That’s the answer Is there a ClientScriptManager.RegisterClientScriptInclude equivalent for CSS, Hope this helps those looking for an answer. Then we suggest to do a search for the next question and find the answer only on our site.

Disclaimer :

The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you

Read More  Open source or low cost “log shipping” program