Best practises for using CSS with composite server controls.

Discussion in 'ASP .Net' started by Peter Rilling, Jun 8, 2007.

  1. Hi,

    I am creating some ASP.NET composite server controls (inheriting from
    CompositeControl). Right now I have the styles for the various objects
    hardcoded, but what I would like to do is allow the user to use a stylesheet
    without actually knowing the internal structure of the control. I am
    insterested in knowing some of the best pracises for using stylesheets with
    composite controls.

    For example, when a person sets a border style on the main object, I would
    like it not to affect the main container but rather the chile controls such
    as textboxes and so on.
     
    Peter Rilling, Jun 8, 2007
    #1
    1. Advertising

  2. Peter Rilling

    PlatinumBay Guest

    Peter,

    I think that to apply a CSS style to a child control, you would need to
    write logic to do this.

    Hope this helps,


    Steve

    "Peter Rilling" <> wrote in message
    news:%...
    > Hi,
    >
    > I am creating some ASP.NET composite server controls (inheriting from
    > CompositeControl). Right now I have the styles for the various objects
    > hardcoded, but what I would like to do is allow the user to use a
    > stylesheet without actually knowing the internal structure of the control.
    > I am insterested in knowing some of the best pracises for using
    > stylesheets with composite controls.
    >
    > For example, when a person sets a border style on the main object, I would
    > like it not to affect the main container but rather the chile controls
    > such as textboxes and so on.
    >
    >
     
    PlatinumBay, Jun 9, 2007
    #2
    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. Jon Rea
    Replies:
    14
    Views:
    741
    Gabriel
    Feb 1, 2006
  2. sufferthefools

    Best database practises

    sufferthefools, Jun 20, 2006, in forum: C++
    Replies:
    1
    Views:
    307
    Ian Collins
    Jun 20, 2006
  3. Memfis
    Replies:
    3
    Views:
    429
    mlimber
    Nov 14, 2006
  4. Richard Coltrane

    Site Security - Best Practises

    Richard Coltrane, May 11, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    237
    Michael Nemtsev [MVP]
    May 11, 2008
  5. Mike Tallman
    Replies:
    0
    Views:
    118
    Mike Tallman
    Nov 22, 2005
Loading...

Share This Page