To Response.Write or Not to Response.Write
Hi,
Are there pro's or con's to either of the below?
One breaks out of asp to do the HTML the other Response.Writes the HTML.
Thanks,
Al.
Code:
<TD colspan="4" align="center">
<%If CallWork="Completed" then%>
<Input type=submit name="btn" value="Report Parts Used">
<Input type=submit name="btn" value="No Parts Used">
<%Else%>
<Input type=submit name="btn" value="Enter Repair Text">
<%End If%>
<button type="reset">Clear Form</button>
<button onclick="history.go(-1)"><font color="blue"><b>Back</b></font>
</TD>
Code:
<%
With Response
.Write "<TD colspan='4' align='center'>"
If CallWork="Completed" then
.Write "<Input type=submit name='btn' value='Report Parts Used'> "
.Write "<Input type=submit name='btn' value='No Parts Used'> "
Else
.Write "<Input type=submit name='btn' value='Enter Repair Text'> "
End If
.Write "<button type='reset'>Clear Form</button> "
.Write "<button onclick='history.go(-1)'><font color='blue'><b>Back</b></font>"
.Write "</TD>"
End With
%>
Re: To Response.Write or Not to Response.Write
Quote:
Originally posted by Al Smith
[B]Hi,
Are there pro's or con's to either of the below?
One breaks out of asp to do the HTML the other Response.Writes the HTML.
Thanks,
Al.
well, i have to have a say on this subject. sorry.
1.) I think it doesnt really matter unless ur running a slow server and unless its battling under the workload then there isnt reallly that much to worry about.
2.) switching between ASP & HTML all the time makes things more confusing, keeping to biger chunks of the same language makes for easier modifying of code as needed (coding the page).
ME!