“如果"在 ASP.NET MVC 视图 (.aspx) 文件中被认为是有害的?
问题描述:
我记得看到一个博客(或其他东西)说你不应该在 ASP.NET MVC 的 .aspx 文件中使用 <% if ... %> ,但我不记得它说的替代方案是什么.有谁记得看到这个并指出它吗?
I remember seeing a blog (or something) that said you should not use <% if ... %> in .aspx files in ASP.NET MVC, but I can't remember what it said the alternative is. Can anyone remember seeing this and point me to it?
答
我不确定这是不是你看到的,但是 这里 是一篇提到它的博客.见第 11 项.
I'm not sure if this is what you saw, but here is a blog that mentions it. See item #11.