Page

9.1.1- Isolating the Location of the Error

  by NT Community Manager.
Last Updated  by Jim Minatel.  

PublicCategorized as 09. Error Handling.

Not tagged.
<< 9.1.0- Arrgh! I Goofed Again!Chapter99.1.2- Using Objects Correctly >>

Isolating the Location of the Error

We're going to have a brief look at the ASP architecture again, because it's important to know where the error is occurring. This is partly revision from earlier chapters, but we're looking at it again here so you see its importance to debugging. Let's have a look at a request for an ASP page.

 543636_pg332.jpg

This shows a typical situation. In step 1, the user selects a URL for an ASP page and the request is forwarded to the web server. Step 2 shows ASP processing the ASP script code on the server. The processed HTML is then sent back to the client in step 3. And finally, in step 4 the web browser displays the HTML and executes any client-side script. Pretty obvious, but also very important as you must be aware of where certain actions are processed.

 

The thing to remember is the difference between server-side script and client-side script. Server-side script is enclosed in the following tags:

 

<%

' server-side script here

%>

Alternatively, server-side script can be denoted by using the standard script tag and the RUNAT property:

 

<SCRIPT LANGUAGE=VBScript RUNAT=Server>

' server-side script here

</SCRIPT>

 

Client-side script is enclosed in the standard script tag:

 

<SCRIPT LANGUAGE=VBScript>

' client-side script here

</SCRIPT>

 

You might already be used to this by now, but it's surprising how often you forget where the script code is being executed, especially if your ASP page has both server-side and client-side script.

<< 9.1.0- Arrgh! I Goofed Again!Chapter99.1.2- Using Objects Correctly >>

Copyright © 2003 by Wiley Publishing, Inc.

Powered by Near-TimeTerms of Services | Privacy Policy | Security Policy |