>I'm missing something glaringly obvious (not to me but I'm sure it is simple).
>
>
>You are doing..
>
>Dim page As MyWebPage
>
>
>My page is Default.aspx which is class _Default
>
>If I try
>
>Dim page as _Default
>
>I get an error "Type '_Default' is not defined"
>
They might not be within the same namespace. Try prefixing the as _Default with the full namespace or add a Imports statement.