tags:

views:

424

answers:

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>
+8  A: 
<%@ Page Language="VB" Strict="true" %>
IAmCodeMonkey
+3  A: 

Change the top line to

<%@ Page Language="VB" strict="True" %>
Mitchel Sellers
A: 

Thanks, generous upvotes to all...

Shawn Simon
A: 

That works for Strict, but not for Infer. When I put Infer="True", I get "Type System.Web.UI.Page does not have a public property named 'infer'.

I am working against ASP.NET 4.0.

Any suggestions?

Jos