Sorry for confused question. here is detail question.
I m implementing front controller in asp.net.
we implement three event-handler
1. PreRequestHandlerExecute
2. PostRequestHandlerExecute
3. BeginRequest
we just want to initialize the page, but dont want to load it.
After BeginReq the page should Load.
becuse we need to fill Datagrid through Command
and then load it.
is there any event in httpmodule that initialises page init events
or is there some thing we are missing in whole here
please help me.
Thanks and Regards.
Moid
------Code:-------------
Public Class Handler
Implements IHttpModule
Public Sub Init(ByVal ctx As System.Web.HttpApplication) Implements
System.Web.IHttpModule.Init
AddHandler ctx.PreRequestHandlerExecute, AddressOf
context_PreRequestHandlerExecute
AddHandler ctx.PostRequestHandlerExecute, AddressOf
context_PostRequestHandlerExecute
AddHandler ctx.BeginRequest, AddressOf context_BeginRequest
End Sub 'Init
Private Sub pageInit(ByVal [source] As [Object], ByVal e As
EventArgs)
End Sub
Private Sub context_BeginRequest(ByVal [source] As [Object], ByVal e
As EventArgs)
Dim application As HttpApplication = CType([source],
HttpApplication)
Dim context As HttpContext = application.Context.Current
Dim session As HttpSessionState = context.Session
Try
Dim command As Command =
CommandFactory.Make(context.Request.RawUrl)
If Not (command Is Nothing) Then
command.Execute(context)
Else
End If
Catch
End Try
End Sub
Public Sub Dispose() Implements IHttpModule.Dispose
End Sub
Private Sub context_PreRequestHandlerExecute(ByVal sender As Object,
ByVal e As EventArgs)
'...Code
End Sub 'context_PreRequestHandlerExecute
Private Sub context_PostRequestHandlerExecute(ByVal sender As
Object, ByVal e As EventArgs)
'...Code
End Sub 'context_PostRequestHandlerExecute
End Class
--------------------------------