Passing variables in classic ASP
You should consider that the page was embedded in one continuous page, so if you include several files .asp, they will make up your completed page.
For example, if you have three files:
File_1.asp
<h1>Hello, World!</h1>
File_2.asp
<p>This file will be included too!</p>
File_3.asp
<%Dim version
version = 1.1%>
... and include them in a single kernel file ...
File_Output.asp
<!-- #include virtual="file_1.asp" -->
<!-- #include virtual="file_2.asp" -->
<!-- #include virtual="file_3.asp" -->
<% Response.Write(version) %>
File_Output.asp version, File_3.asp.
- EDIT -
( ):
, ASP. VBScript , JScript (, , JavaScript) .
, Err:
On Error Resume Next '<-- This line starts trapping errors
...
On Error Goto 0 '<-- This line stops trapping errors
, . ASP.NET, Java .., , ; Try...Catch, . , . . script, . : Number Err:
On Error Resume Next '<-- This line starts trapping errors
'Some database manipulation...
If Err.Number <> 0 Then
... 'Handle the error
End If
On Error Goto 0 '<-- This line stops trapping errors
, :
On Error Resume Next '<-- This line starts trapping errors
'Some database manipulation...
Select Case Err.Number
Case 1
... 'Handle the error
Case 2
...
Case 3021 'No data returned
Response.Write("No data was returned.")
End Select
On Error Goto 0 '<-- This line stops trapping errors
, .