Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Dynamically add a stylesheet link to a page from WebControl code.

Thread Tools

Dynamically add a stylesheet link to a page from WebControl code.

Matias Owsianik
Posts: n/a
Hi everybody!

I created a composite webcontrol and I'm packing it in it's own
assembly, so that I can be deployed on other developers' machines, so
they can easily use it in their pages.

This webcontrol has it's own CSS file, where styles are stored and can
be easily changed.

I'm planning to create a setup package that adds the webcontrol to the
users' GAC and also creates a folder named
\inetpub\wwwroot\mycompany_webctrl_client\myContro l\1_0\ and copy
there the .CSS file(s), images, etc. The idea is that when someone
wants to add the webcontrol to their pages, he just has to drag and
drop it from the toolbox.

Well, the problem is that I don't want the users to manually add the
<LINK rel="stylesheet" href="..."> tag to each page where the control
is added. I want the control to automatically add it when its dragged
(or whenever).

Does anybody know how to do that? I need this to work both on run-time
and design-time.

Thanks in advanced!

Reply With Quote

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
Add a StyleSheet to the body dynamically _Who ASP .Net 6 09-18-2008 07:43 PM
Dynamically add link to css stylesheet? =?Utf-8?B?RGF2ZQ==?= ASP .Net 3 11-02-2004 02:14 AM
Stylesheet referanse i stylesheet =?ISO-8859-1?Q?J=F8rn_Tommy_Kinder=E5s?= XML 3 07-04-2004 03:16 PM
Problem with XML WebControl, and css stylesheet link George Kustas ASP .Net 0 12-03-2003 10:48 PM
Dynamically add the stylesheet(.CSS file) VSK ASP .Net 3 11-25-2003 05:34 PM