<script runat="server"> Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init Throw New System.Exception("page_init") End Sub Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim loDataEntry As DataEntryPurchase = New DataEntryPurchase(oApp) loDataEntry.GenerateForm() End Sub </script>So far, so good, now, if I subclass this page and move the Page_Init() code in a class instead by doing this:
Namespace Framework Public Class WebForm Inherits System.Web.UI.Page Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init Throw New System.Exception("page_init from the class") End Sub End Class End NamespaceThe exception is never thrown. Can someone explain me why in inheritance mode that the Page_Init() event is not fired but only in the page itself?