p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_codeclinic thread: Efficient Code


Message #1 by rg1@h... on Fri, 20 Apr 2001 15:56:59
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: > : > :     These are both exactly the same.  The <%= %> is
shorthand/embedded
:
: > <% =%> and Response.Write() will give you the same performance. But
that's
: > not what I said:
:
:     Oh, I thought we were referring to performance.  I wasn't actually
talking
: syntax or order of the code.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

We /were/ talking about performance - the difference between:

(
 <td><% =strVar%></td>

    - or -

 <td><% Response.Write(strVar)%></td>
)

    - and -

<% Response.Write("<td>" & strVar & "</td>") %>

The first two (in brackets), as you point out, are the same. They are both
different to the third...

*Both* the first two involve context switching. The third has *no* context
switching, but has VBScript string concantenation issues.

Cheers
Ken


  Return to Index