DOCUMENT:Q246915 13-FEB-2000 [iis] TITLE :Using <% %> Instead of tags instead of or in addition to <% %> tags to denote Active Server Pages (ASP) code in a page, the processing of ASP code may appear to be out of order. CAUSE ===== This behavior is by design. ASP code in

Line 2

Browsing this page will output the following HTML:

Line 2

Line 1

The HTML output would seem at first glance to be out of order based on the location of the script inside the page. - Save this next script as "Test2.asp" (without the quotation marks) in the same folder as for the previous example: <% @language="vbscript" %> <% Response.Write "

Line 1

" %>

Line 2

Browsing this page will output the following HTML:

Line 1

Line 2

So, if you use <% Response.Write strText %>

Line 2

Browsing this page will output the following HTML:

Line 2

The text "Line 1" is not output because the variable "strText" will not be populated until after the Response.Write has already been executed. Additional query words: ====================================================================== Keywords : kbOSWin2000 kbDSupport kbiis400 kbiis500 Technology : kbiisSearch kbiis500 kbiis400 Version : winnt:4.0,5.0 Issue type : kbprb Solution Type : kbpending ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 2000.