Error with option explicit

R

Robert Mark Bram

Hi All!

I have the following in a vb script:

option explicit
Response.Expires = -1
Server.ScriptTimeout = 600

The script gets imported in the following way:
<script language="VBscript" runat=server src="lib/upload/aspUpload.asp">
</script>

I get the following error:

Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/RobertMarkBram/lib/upload/aspUpload.asp, line 10
option explicit


I do *not* have this in my script:
<%@ LANGUAGE=VBSCRIPT EnableSessionState=False %>
<%
Option Explicit
%>

Because the script is an external vb library.. (I use JavaScript on the same
page).

Can anyone suggest how I can get option explicit in there?

Thanks for any advice!

Rob
:)
 
B

Bob Barrows [MVP]

Robert said:
Hi All!

I have the following in a vb script:

option explicit
Response.Expires = -1
Server.ScriptTimeout = 600

The script gets imported in the following way:
<script language="VBscript" runat=server
src="lib/upload/aspUpload.asp"> </script>

I get the following error:

Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/RobertMarkBram/lib/upload/aspUpload.asp, line 10
option explicit


I do *not* have this in my script:
<%@ LANGUAGE=VBSCRIPT EnableSessionState=False %>
irrelevant

<%
Option Explicit

Are you sure?

"Option Explicit" can only be used one in a page. If it appears in an
included file, it cannot appear in other included files, nor in the "host"
page.

Bob Barrows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top