T
tshad
I am trying to set "Option Strict On" on my single .aspx page. I am not
using code-behind or VS. I am running this in DW on Asp.net 1.1
If I do the following:
*************************************************************************
<%@ Page Language="VB" trace=true debug=true ContentType="text/html"
ResponseEncoding="iso-8859-1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<script Language="vb" runat=server>
Option Strict On
Sub Page_Load()
End Sub
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
</body>
</html>
**************************************
I get the error:
**********************************************
Compiler Error Message: BC30627: 'Option' statements must precede any
declarations or 'Imports' statements.
Source Error:
Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
Line 3: <script Language="vb" runat=server>
Line 4: Option Strict On <-- the error line
Line 5: Sub Page_Load()
Line 6:
**********************************************
There are no Imports statements.
I tried to put the Script at the top of the page - but got the same error:
*************************************************
<script language="vb" runat="server">
Option Script On
</script>
<%@ Page Language="VB" trace=true debug=true ContentType="text/html"
ResponseEncoding="iso-8859-1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<script Language="vb" runat=server>
Sub Page_Load()
End Sub
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
</body>
</html>
**************************************************
How do I put my Option in my Script if I can't put it at the beginning of my
script section or beginning of the page?
Thanks,
Tom
using code-behind or VS. I am running this in DW on Asp.net 1.1
If I do the following:
*************************************************************************
<%@ Page Language="VB" trace=true debug=true ContentType="text/html"
ResponseEncoding="iso-8859-1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<script Language="vb" runat=server>
Option Strict On
Sub Page_Load()
End Sub
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
</body>
</html>
**************************************
I get the error:
**********************************************
Compiler Error Message: BC30627: 'Option' statements must precede any
declarations or 'Imports' statements.
Source Error:
Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
Line 3: <script Language="vb" runat=server>
Line 4: Option Strict On <-- the error line
Line 5: Sub Page_Load()
Line 6:
**********************************************
There are no Imports statements.
I tried to put the Script at the top of the page - but got the same error:
*************************************************
<script language="vb" runat="server">
Option Script On
</script>
<%@ Page Language="VB" trace=true debug=true ContentType="text/html"
ResponseEncoding="iso-8859-1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<script Language="vb" runat=server>
Sub Page_Load()
End Sub
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
</body>
</html>
**************************************************
How do I put my Option in my Script if I can't put it at the beginning of my
script section or beginning of the page?
Thanks,
Tom