I am not a VB.NET expert (I write in C #), but I can say that the cause of the problem is that you need to override the OnInit method instead of the Page_Init parameter.
So you need to use the following code:
Public Class _Default Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub Protected Friend Overrides Sub OnInit(ByVal e As EventArgs) MyBase.OnInit(e) End Sub End Class
source share