Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP script chokes on Option Explicit 1

Status
Not open for further replies.

SBendBuckeye

Programmer
Joined
May 22, 2002
Messages
2,166
Location
US
No matter how I try to code it, my file errors out on the Option Explicit line. I have language set to VBScript. Any ideas on this?

Thanks!

Have a great day!

j2consulting@yahoo.com
 
Hey,

I can't see your code so this is just a guess but Option Explicit has to be the very first ASP statement on the page before it will work.

If that isn't the problem try posting some code for us to look at.





Travis Hawkins
BeachBum Software
travis@cfm2asp.com
 
Hello Travis,

Thanks for your help! I had an include directive first. Once I moved that under the Option Explicit as below everything worked fine.

This works fine

<% @ Language = &quot;VBScript&quot; %>
<% Option Explicit %>
<!-- #Include Virtual=&quot;/IncludeFiles/KevinDemp.asp&quot; -->
<% Rest of code %>

This didn't work

<!-- #Include Virtual=&quot;/IncludeFiles/KevinDemp.asp&quot; -->
<% @ Language = &quot;VBScript&quot; %>
<% Option Explicit %>
<% Rest of code %>

Have a great day!

j2consulting@yahoo.com
 
yep, that'll get you every time.
I'm glad you got it figured out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top