solving consistent look problem

Discussion in 'ASP .Net' started by JJ, Oct 30, 2006.

  1. JJ

    JJ Guest

    Using asp.net 1.1

    I am trying to have a consistent look for the webcontrols. Right now, every
    time I use textbox controls, I manually change the font property, size
    property, and other property to the default values that I use for all
    webcontrols. So a lot of manual work. To streamline the process, I see two
    possibilities.

    1. Would it be better to do this by extending a textbox control by creating
    my own control (ie creating a web control project for each controls that I
    use, be it label, dropdown textbox etc)
    2. Use the CssClass property of each webcontrol to control.

    Problem with the creating my own control is that to create the dll, I have
    to create web control project for each control (to have this new control in
    the toolbox of IDE). I thought I just need to create the new class that
    extends the textbox class but I guess that is not possible (without creating
    a new project)?

    Problem with the using CssClass is that I also have to manually add link tag
    for every single page and setting value for CssClass.

    How do you go about solving this problem? What is the best way? Any
    recommendation and advice will be appreciated.
    Thanks
    JJ, Oct 30, 2006
    #1
    1. Advertising

  2. You are partially correct on #1. You will have to create a library to
    contain the control to get it on the toolbox. This is still a great option,
    as you can reuse acros multiple projects.

    #2 is also a good option, but you will have to set the CSS for each control,
    or create a snippet with the control attached to CSS and reuse it.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA
    http://gregorybeamer.spaces.live.com

    *************************************************
    Think outside of the box!
    *************************************************
    "JJ" <> wrote in message
    news:uzcpdyC$...
    > Using asp.net 1.1
    >
    > I am trying to have a consistent look for the webcontrols. Right now,
    > every time I use textbox controls, I manually change the font property,
    > size property, and other property to the default values that I use for all
    > webcontrols. So a lot of manual work. To streamline the process, I see
    > two possibilities.
    >
    > 1. Would it be better to do this by extending a textbox control by
    > creating my own control (ie creating a web control project for each
    > controls that I use, be it label, dropdown textbox etc)
    > 2. Use the CssClass property of each webcontrol to control.
    >
    > Problem with the creating my own control is that to create the dll, I have
    > to create web control project for each control (to have this new control
    > in the toolbox of IDE). I thought I just need to create the new class
    > that extends the textbox class but I guess that is not possible (without
    > creating a new project)?
    >
    > Problem with the using CssClass is that I also have to manually add link
    > tag for every single page and setting value for CssClass.
    >
    > How do you go about solving this problem? What is the best way? Any
    > recommendation and advice will be appreciated.
    > Thanks
    >
    Cowboy \(Gregory A. Beamer\), Oct 30, 2006
    #2
    1. Advertising

  3. JJ

    apathetic Guest

    JJ wrote:
    > 1. Would it be better to do this by extending a textbox control by creating
    > my own control (ie creating a web control project for each controls that I
    > use, be it label, dropdown textbox etc)
    > 2. Use the CssClass property of each webcontrol to control.


    It would be best to use CSS, as this is exactly what it's made for.

    You don't even need to use CssClass to get a little bit of styling. For
    example, if it's only text box font you want to control, you can create
    a style definition such as the following that will be picket up by every
    input box:

    input, textarea
    {
    font: 11px Arial;
    }

    apathetic
    apathetic, Oct 30, 2006
    #3
    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. Nick

    Consistent Look and Feel

    Nick, Jan 14, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    386
  2. Bernie
    Replies:
    0
    Views:
    530
    Bernie
    Sep 5, 2004
  3. inhahe
    Replies:
    3
    Views:
    2,321
    Diez B. Roggisch
    Jan 28, 2005
  4. Lionel
    Replies:
    14
    Views:
    1,136
  5. Replies:
    4
    Views:
    160
Loading...

Share This Page