![httpmodule](https://i-blog.csdnimg.cn/blog_migrate/a894f2d6eda743cbc36852087c68d2aa.png)
httpmodule
![](https://i-blog.csdnimg.cn/blog_migrate/a6fcb582638cd1990cd8a403878d02c0.png)
I just love the ASP.NET pipeline. It's so flexible. There's such power to be had when using HttpModules and HttpHandlers together. Here's a good example:
我只是喜欢ASP.NET管道。 非常灵活。 一起使用HttpModules和HttpHandlers时,具有这样的功能。 这是一个很好的例子:
Josh Twist over at JoyOfCode has a "Validator Module" that sits at the very end of the HttpRequest and validates the page you just rendered as XHTML or not, then displays the detailed results. If you've ever found it a hassle to run XHTML validation on your site at runtime you should take a look at this clever idea. With tools like this ValidatorModule plus validation within Visual Studio.NET always improving as well as tools inside of FireFox to validate, there's fewer and fewer excuses to not render XHTML.
JoyOfCode的Josh Twist有一个“验证程序模块”,该模块位于HttpRequest的末尾,并验证您是否刚刚将其呈现为XHTML的页面,然后显示详细结果。 如果您发现在运行时在站点上运行XHTML验证很麻烦,则应该看看这个聪明的主意。 随着诸如ValidatorModule之类的工具以及Visual Studio.NET中的验证功能的不断改进,以及FireFox内进行验证的工具的不断改进,没有呈现XHTML的借口越来越少。
Try it out on Josh's site, pound on his demo, and leave him some feedback. You can add it to your .NET 2.0 applications without recompiling. He's also expressed that he could backport it to .NET 1.1 if there's demand.
在Josh的网站上尝试一下,在他的演示上进行尝试,并给他一些反馈。 您可以将其添加到.NET 2.0应用程序中,而无需重新编译。 他还表示,如果有需求,他可以将其反向移植到.NET 1.1。
Sigh, one day my site will be XHTML...until then, consider me transitional. Now, the real question, is it better to look good (render correctly) or feel good (be XHTML)?
igh,有一天我的网站将是XHTML ...直到那时,我才开始过渡。 现在,真正的问题是,看起来不错(正确渲染)还是感觉不错(是XHTML)会更好吗?
翻译自: https://www.hanselman.com/blog/xhtml-validating-httpmodule-for-aspnet-2
httpmodule