Bearing in mind this is for classic asp
Which is better, all HTML contained within Response.Write Statements or inserting variables into HTML via &l
My classic ASP is rusty, but:
Response.Write "" & vbCrlf
Response.Write "" &vbCrLf
Response.Write "" & someVariable & "" & vbCrLf
Response.Write " " & vbCrLf
Response.Write "
" & vbCrLf
this is run as-is. This, however:
<%= someVariable %>
results in:
Response.Write"\r\n\r\n"
Response.Write someVariable
Response.Write " \r\n \r\n
"
Where \r\n is a vbCrLf
So technically, the second one is quicker. HOWEVER, the difference would be measured in single milliseconds, so I wouldn't worry about it. I'd be more concerned that the top one is pretty much unmaintainable (esp by a HTML-UI developer), where as the second one is trivial to maintain.
props to @Euro Micelli - maintenance is the key (which is also why languages like Ruby, Python, and in the past (tho still....) C# and Java kicked butt over C, C++ and Assembly- humans could maintain the code, which is way more important than shaving a few ms off a page load.
Of course, C/C++ etc have their place.... but this isn't it. :)