|
-
Aug 17th, 2000, 02:26 PM
#1
Thread Starter
Hyperactive Member
Stupid question but which way is faster, if at all?
Code:
<%
Response.Write "File # " & strfilenum
%>
or
Code:
File # <%=strfilenum%>
Thanks
-
Aug 17th, 2000, 02:39 PM
#2
Monday Morning Lunatic
Technically, the second, since it doesn't have to concatenate the string first. However the difference is so marginal that you'll probably never notice.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 17th, 2000, 02:59 PM
#3
Thread Starter
Hyperactive Member
That's what I though, however if I'm iterating through a recordset I'd like for it to be as fast as possible.
-
Aug 17th, 2000, 03:02 PM
#4
Monday Morning Lunatic
In that case, avoid changing between ASP / HTML. As in, the second way, it swaps between them. If you're looping through a recordset, keep it all in ASP code for speed.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 17th, 2000, 03:39 PM
#5
Thread Starter
Hyperactive Member
-
Aug 18th, 2000, 02:34 AM
#6
Fanatic Member
There isn't any difference apart from the concatenation as mentioned.
If you have an error in what is being outputed using the <% = blah %>, the error message that comes up is Error - type mismatch in response.write(blah).
so I don't think there is any difference apart from the time it takes to write it.
Ian
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
-
Aug 18th, 2000, 09:03 AM
#7
Addicted Member
I always considered the first to be typically faster, if you stayed in ServerSide script long
for example
<%
.....
%>
the doted line being several lines , and all responses are sent with Response.write, and %> isnt reached until page is finished.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|