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

M

Matias Owsianik

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\myControl\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!

Matias
 

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,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top