473,406 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Front Controller / IHttpModule

Sir we are 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

Nov 18 '05 #1
0 1158

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Prasad Patil | last post by:
Hi I am trying to understand the article http://msdn.microsoft.com/practices/type/Patterns/Enterprise/DesFrontController/...
2
by: Colin Basterfield | last post by:
Hi, has anyone (tried to) implement the Front Controller pattern as described at http://msdn.microsoft.com/architecture/patterns/ImpFrontControllerInASP/ I'm having trouble resolving the...
2
by: Magdelin | last post by:
I am trying to implement the front controller web presentation design pattern proposed by MS at the following link: http://msdn.microsoft.com/practices/type/patterns/enterpris...
1
by: NGM | last post by:
Hello All When implementing FrontController sample MSDN I am facing a lot of problems try implementing the front controller patterm sample provided by microsoft:...
2
by: Alok Jain | last post by:
Hi, We are using Front Controller implementation in our DotNet application. I am trying to hide URL in my application. This is based on Front Controller model. I am able to achieve if I do...
5
by: garethdjames | last post by:
A while ago I read news about ASP.Net 2.0 having support for the Front Controller model, In all the reports I have read and in the latest beta download I can see no implicit support for this...
3
by: Ashish | last post by:
Is anyone aware of a good Front Controller Pattern implementation in ASP.Net, we are developing a new product, and contemplating whether we should use Front Controller Pattern implementation, due...
4
by: Kunle Odutola | last post by:
WebForms used to be a Page controller architecture (in .NET 1.x) which severely limited (prevented?) true MVC designs with WebForms. Any ideas? -- Don't talk unless you can improve the silence.
1
by: Aquaren | last post by:
I have a framework that uses the front controller design pattern for a single point of entry to the application and the autoload function for includes. I am trying to incorporate AJAX into the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.