Click here to Skip to main content
15,904,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I looked at this example. Add a header and footer control to all web pages in a web application, using HTTP module[^]
Can we have this same functionality in MVC project?

I have MVC project where i want to add common header-footer using .ascx file. And .ascx file would have some .Net Code snippets

Thanks for any help in advance...!!
Posted
Updated 14-Jan-11 5:33am
v2

MVC is built on top of asp.net, have you tried to just use your existing handler?

Regards
Espen Harlinn
 
Share this answer
 
Comments
Darshak Sheth 14-Jan-11 13:18pm    
I don't know how we can access MVC "View" result/output in HttpModule. Do you know how we can use ViewPage.LoadControl() method? Also I don't know how we can access .ascx file in Custom HttpModule in MVC. I tried to change Response object in HttpModule without success.
Couldnt filters be used here?

I know its a bad practice to poke a dead man, but as this was one of the first google results, and with no visible answer, figured it still might be worth the shot ^^
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900