Walter,
take a look at this code I wrote...
it will handle the PageInit event for all pages.....
I hope it helps..
Bruno
Public Class MyModule
Implements IHttpModule
Public Sub Dispose() Implements System.Web.IHttpModule.Dispose
End Sub
Public Sub Init(ByVal context As System.Web.HttpApplication) Implements
System.Web.IHttpModule.Init
AddHandler context.PreRequestHandlerExecute, AddressOf
PreRequestHandlerExecute
End Sub
Sub PreRequestHandlerExecute(ByVal sender As Object, ByVal e As
System.EventArgs)
AddHandler CType(CType(sender, HttpApplication).Context.CurrentHandler,
Page).Init, AddressOf PageInit
End Sub
Private Sub PageInit(ByVal sender As Object, ByVal e As System.EventArgs)
Dim p As Page = CType(sender, Page)
p.Response.Write("Hello")
End Sub
End Class
"walter" <ww*@morneausobeco.com> wrote in message
news:8F**********************************@microsof t.com...
Hi there , for sure httpmodule can be hooked up with HttpApplication
event.
But I'm wondering if it's poissible to trigger a httpModule in the page
event
,like Page.Init().
Since request handler will be different among http/aspx, I hardly see it's
possible. But may be someone knows. Reason I want to do this is because I
like the plugin model provided by asp.net framework, but this time is just
for page. If I can hook httpmodule and page event together, then I can
make
the page become plugable.
Appreciate any inspiriting thought.
Walter