4

Umm, I guess my questions in the title:

How do I turn on Option Strict / Infer in a VB.NET aspx page without a code behind file?

<%@ Page Language="VB" %>
<script runat="server">
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)

    End Sub
</script>
jmoreno
  • 12,752
  • 4
  • 60
  • 91
Shawn
  • 19,465
  • 20
  • 98
  • 152

2 Answers2

13
<%@ Page Language="VB" Strict="true" %>
IAmCodeMonkey
  • 1,576
  • 1
  • 11
  • 11
3

Change the top line to

<%@ Page Language="VB" strict="True" %>
Mitchel Sellers
  • 62,228
  • 14
  • 110
  • 173