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. Advertisements

  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. Advertisements

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. sleigh
    Replies:
    1
    Views:
    2,934
    sleigh
    Feb 12, 2004
  2. Jon Rea
    Replies:
    14
    Views:
    977
    Gabriel
    Feb 1, 2006
  3. sufferthefools

    Best database practises

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

    Site Security - Best Practises

    Richard Coltrane, May 11, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    312
    Michael Nemtsev [MVP]
    May 11, 2008
  6. Mike Tallman
    Replies:
    0
    Views:
    189
    Mike Tallman
    Nov 22, 2005
  7. Mike

    Composite vs non composite Controls

    Mike, Mar 10, 2005, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    455
    Sundararajan
    Mar 11, 2005
  8. Alex Dunae
    Replies:
    5
    Views:
    230
    Alex Dunae
    Nov 9, 2007
Loading...