well it's usual if u have Page_load event at for ur web page, it might look something like this
it won't be a problem if u .NET handle everthing for u..for example it would displayed an error page with all those stuff that only developer that fine with it..
it'll be a trouble if u want to display ur own error description(if ur page is inherited by ur own page base class that will handle the error more elegantly)
the key is to addHandler at page init event for each Page that inherits from the Page Base Class(will occured before page being displayed) and remove those bold area
it will look something like this
so it would be processing ur Base Page Class Page_Load event before its own Page_Load event
otherwise it would process it own Page_load then Base Page Class Page_Load event
'till then
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) handles Mybase.Load
...
End Sub
it won't be a problem if u .NET handle everthing for u..for example it would displayed an error page with all those stuff that only developer that fine with it..
it'll be a trouble if u want to display ur own error description(if ur page is inherited by ur own page base class that will handle the error more elegantly)
the key is to addHandler at page init event for each Page that inherits from the Page Base Class(will occured before page being displayed) and remove those bold area
it will look something like this
Private Sub Page_Init( _
ByVal sender As Object, _
ByVal e As EventArgs) _
Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
AddHandler Me.Load, AddressOf Page_Load
InitializeComponent()
End Sub
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
...
End Sub
so it would be processing ur Base Page Class Page_Load event before its own Page_Load event
otherwise it would process it own Page_load then Base Page Class Page_Load event
'till then
Comments