我们可以在MVC中使用HttpModule添加动态页眉和页脚吗? [英] Can we add dynamic Header and Footer using HttpModule in MVC?

查看:145
本文介绍了我们可以在MVC中使用HttpModule添加动态页眉和页脚吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看了这个例子。 使用HTTP模块向网络应用程序中的所有网页添加页眉和页脚控件 [ ^ ]

我们可以拥有这个MVC项目中的相同功能?



我有MVC项目,我想使用.ascx文件添加公共页眉。并且.ascx文件会有一些.Net Code片段



感谢提前任何帮助...... !!

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

推荐答案

MVC建立在asp.net之上,您是否尝试过使用现有的处理程序?



问候

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

Regards
Espen Harlinn


这里不能使用过滤器吗?



我知道戳一个死人是一种不好的做法,但是因为这个是第一个google结果之一,没有明显的答案,认为它仍然值得拍摄^^
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 ^^


这篇关于我们可以在MVC中使用HttpModule添加动态页眉和页脚吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆