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

Discussion in 'ASP .Net Web Controls' started by Matias Owsianik, Jul 19, 2004.

  1. 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
     
    Matias Owsianik, Jul 19, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VSK
    Replies:
    3
    Views:
    5,007
    S. Justin Gengo
    Nov 25, 2003
  2. George Kustas
    Replies:
    0
    Views:
    450
    George Kustas
    Dec 3, 2003
  3. =?Utf-8?B?RGF2ZQ==?=

    Dynamically add link to css stylesheet?

    =?Utf-8?B?RGF2ZQ==?=, Nov 1, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    11,817
    Justin Beckwith
    Nov 2, 2004
  4. =?ISO-8859-1?Q?J=F8rn_Tommy_Kinder=E5s?=

    Stylesheet referanse i stylesheet

    =?ISO-8859-1?Q?J=F8rn_Tommy_Kinder=E5s?=, Jul 3, 2004, in forum: XML
    Replies:
    3
    Views:
    578
    =?ISO-8859-1?Q?J=F8rn_Tommy_Kinder=E5s?=
    Jul 4, 2004
  5. _Who
    Replies:
    6
    Views:
    578
Loading...

Share This Page