Combing html and server controls

  • Thread starter Thread starter Will
  • Start date Start date
W

Will

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
 
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)
 
Back
Top