Response.Redirect in HttpModule

Posted by AgentHunt on Stack Overflow See other posts from Stack Overflow or by AgentHunt
Published on 2009-08-28T17:29:18Z Indexed on 2010/05/27 2:01 UTC
Read the original article Hit count: 294

Can I do a redirect to a custom page in an HttpModule?

I have an HttpModule A which executes some javascript code when any aspx page is loaded. I would like to have a server side code check to see if the clients browsers supports cookies. Can I place that code in the HttpModule A? If so, in which event? Or do I need to have a new HttpHandler for both purposes?

Also, is it possible to check for cookies in an HttpModule(without a response.redirect)? All solutions I have seen need 2 pages, 1 for setting the cookie and the other for checking if the cookie has actually been created. I am hoping there should be a way to check for cookies at one place.

Thanks in advance

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about cookies