HOWTO: Include Style Sheet Links in the ASCX Controls?

  • Thread starter Thread starter Don Wash
  • Start date Start date
D

Don Wash

Hi There!

I'm creating several ASCX Controls and those controls will have their own
CSS Style Sheets. But I don't know how I can link the corresponding Style
Sheet in the ASCX file? Because the style sheet can only be linked in the
<head></head> section of an HTML document, right? So ASCX controls does not
have <head> tags so how can I link the style sheets?

Many thanks in advance!
Don
 
set the cssclass to whatever you need it to be... since user control will
always be a part of a page. as long as the page has the stylesheet directive
it will apply the stylesheet to the user control. (css stylesheets are
client site... )

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
 
Hi Hermit,

Thanks for the reply.

But then, I have to remember to include the corresponding style of each
control in every page that consumes. How do I workaround this?

Thanks again!
Don
 
i only have one global style sheet which all my aspx pages use. it has all
the classes and element based style
all you do is include it in your aspx pages and as long as controls set the
cssclasses you should be fine.

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
 
Back
Top