Combing html and server controls

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
 
B

bruce barker

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,732
Latest member
ArronPalin

Latest Threads

Top