Friday, June 10, 2016

Spooling up HTML on the code side!

As suggested here, one may just spool up a bunch of gunk via string concatenation in code and then barf it into a web page as HTML. I did this all the time in PHP a dozen years ago and supposedly when guys like me were trying to transition to web forms we did the same thing with the Literal control. For a while this became seen as a bad practice, but perhaps individual HTML tags can be crafted sparingly on the C# side. I'd keep such mechanics in the UI project of an Onion Architecture approach. Again, it's for individual tags not a big spool of tags back to back. That part of the past needs to be left in the past.

No comments:

Post a Comment