What is the best way to create HTML in C# code?

Posted by Rodney on Programmers See other posts from Programmers or by Rodney
Published on 2012-10-17T17:36:30Z Indexed on 2012/10/18 5:22 UTC
Read the original article Hit count: 438

Filed under:
|
|

I have a belief that markup should remain in mark-up and not in the code behind.

I've come to a situation where I think it is acceptable to build the HTML in the code behind. I'd like to have some consensus as to what the best practices are or should be.

When is it acceptable to build html in the code behind? What is the best method to create this html? (example: Strings, StringBuilder, HTMLWriter, etc)

© Programmers or respective owner

Related posts about c#

Related posts about ASP.NET