Combing html and server controls

Discussion in 'ASP .Net' started by Will, Aug 2, 2008.

  1. Will

    Will Guest

    I'm interested in people's views on combining standard html controls
    and asp.net server controls.

    I've seen some applications where server controls were only used where
    server side processing and control were required, combining them with
    standard html for the static part of the page. Others have constructed
    the page using almost entirely server controls (for example, using
    asp:Label controls for text that will not change).

    Is there a consensus on best practice here? For myself, I err on the
    side of using html controls as much as possible (without the runat
    attribute) as there is more consistency to how they are rendered. and
    are easier to control with CSS.

    Thanks
    Will, Aug 2, 2008
    #1
    1. Advertising

  2. Will

    bruce barker Guest

    use asp.net controls if you want abstraction from html and like the
    "fake" event processing of asp.net. use html controls if you are writing
    client code, or are concered about the html generated.

    if you know html, you might want to switch to MVC toolkit, which
    eliminates the fake events, and allows unit tests.

    -- bruce (sqlwork.com)

    Will wrote:
    > I'm interested in people's views on combining standard html controls
    > and asp.net server controls.
    >
    > I've seen some applications where server controls were only used where
    > server side processing and control were required, combining them with
    > standard html for the static part of the page. Others have constructed
    > the page using almost entirely server controls (for example, using
    > asp:Label controls for text that will not change).
    >
    > Is there a consensus on best practice here? For myself, I err on the
    > side of using html controls as much as possible (without the runat
    > attribute) as there is more consistency to how they are rendered. and
    > are easier to control with CSS.
    >
    > Thanks
    bruce barker, Aug 2, 2008
    #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. =?Utf-8?B?c2lhag==?=
    Replies:
    7
    Views:
    1,457
    =?Utf-8?B?c2lhag==?=
    Mar 7, 2005
  2. deanfamily

    Combing two linked lists

    deanfamily, Dec 7, 2005, in forum: C++
    Replies:
    7
    Views:
    389
    Robbie Hatley
    Dec 7, 2005
  3. Replies:
    2
    Views:
    258
    kirby urner
    Dec 15, 2010
  4. Dan Diebolt
    Replies:
    7
    Views:
    140
    Martin DeMello
    Dec 13, 2005
  5. Mordechai Mr
    Replies:
    0
    Views:
    211
    Mordechai Mr
    Aug 27, 2009
Loading...

Share This Page