Initializing webform through PageInit() in HttpModule, Httphandler

M

moid

i need help so that i can initialize page thorugh
http module or handler

i know it is possible through handler using
ProcessRequest but im aint configure the
things out.

i need some thing like this
Initialises form => fill's datagrid through dataset using commandfactory/command => load form

please help

Moid Iqbal
 
M

Mas Jabier

Moid,

Just get confused with your question.
What's wrong with using Page_Load event?? Or
Application_Begin Request in Global.asax.xx.?? You can
make initialization here.

Can you show me some details ?

Rgds,
Jody Ananda
MCAD.NET,MCSD.NET
"All programs are poems, it just not all programmers are
poets."

-----Original Message-----
i need help so that i can initialize page thorugh
http module or handler

i know it is possible through handler using
ProcessRequest but im aint configure the
things out.

i need some thing like this
Initialises form => fill's datagrid through dataset using
commandfactory/command => load form
 
M

moid

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
--------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top