Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 20, 2012 09:17 AM by nijhawan.saurabh
Apr 20, 2012 06:21 AM|LINK
I create a http module to check the page is refreshed or postback
I include this in web config as follows
<add name="Myhandler" type="Myhandler"/>
Now i want that this module work only when request is going for a specific page not for the whole project ,
what can i do for this
Apr 20, 2012 06:30 AM|LINK
One way to do this is to partition your pages into a folder hierarchy
and then to add a web.config, with the HttpModule configured, to the
subtrees which require that HttpModule.
Or else use HttpHandlers which allow you to specify the path.
A Http Module is invoked for every request. Are you sure it's not a Http Handler you are trying to create?
Apr 20, 2012 06:48 AM|LINK
How can i do it by Http Handlers,actually i implement a Ihttpmodile
Apr 20, 2012 06:52 AM|LINK
Implement IHttpHandler instead :)
Then you add that into the httphandlers section in web.config where you can specify the path
Apr 20, 2012 09:17 AM|LINK
I suppose you'd also know the difference between httphandlers and httpmodules before choosing one.