Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > HOWTO: Include Style Sheet Links in the ASCX Controls?

Reply
Thread Tools

HOWTO: Include Style Sheet Links in the ASCX Controls?

 
 
Don Wash
Guest
Posts: n/a
 
      08-30-2004
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


 
Reply With Quote
 
 
 
 
Hermit Dave
Guest
Posts: n/a
 
      08-30-2004
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)
"Don Wash" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
Don Wash
Guest
Posts: n/a
 
      08-31-2004
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

"Hermit Dave" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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)
> "Don Wash" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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
>>
>>

>
>



 
Reply With Quote
 
Don Wash
Guest
Posts: n/a
 
      08-31-2004
....

"Don Wash" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
Hermit Dave
Guest
Posts: n/a
 
      08-31-2004
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)
"Don Wash" <(E-Mail Removed)> wrote in message
news:O$(E-Mail Removed)...
> 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
>
> "Hermit Dave" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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)
> > "Don Wash" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >> 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
> >>
> >>

> >
> >

>
>



 
Reply With Quote
 
Don Wash
Guest
Posts: n/a
 
      08-31-2004
....

"Don Wash" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
Don Wash
Guest
Posts: n/a
 
      08-31-2004
....

"Don Wash" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/* #include <someyhing.h> */ => include it or do not include it?That is the question .... Andreas Bogenberger C Programming 3 02-22-2008 10:53 AM
Content Page specific style style sheet rshillington@gmail.com ASP .Net 0 07-14-2006 03:45 PM
Multiple *.ascx files with a single *.ascx.cs in VS.NET 2003 Holger (David) Wagner ASP .Net 2 07-03-2004 09:23 AM
can a dg be added to an ascx? ascx call a ws? Jason Shohet ASP .Net 1 11-10-2003 07:08 PM
[ASCX] Add an ascx in a webcontrol... Quentin ASP .Net 1 07-29-2003 07:37 PM



Advertisments