HOWTO: Include Style Sheet Links in the ASCX Controls?

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
 
H

Hermit Dave

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)
 
D

Don Wash

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
 
H

Hermit Dave

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top