When we build our web apps we construct alot of HTML dynamically and the output them to placeholders at run time. One reason for this is to control our HTML output to optimise it for SEO and now that we have been doing this for a while its become 'the way we do it'. Generally its when we are looping through results.
My question is,
Is there any performance difference between alot of sb.append(someHTML) and then one placeholder.controls.add(new literalcontrol(sb.tostring) vs just using placeholder.controls.add(new literalcontrol(someHTML) every time.
Second should we be using some other method for building and reusing HTML snippets and injecting the data at runtime? We abandoned the standard .net data controls due to the code bloat.
Any thoughts?