简体   繁体   English

Asp.net的模板引擎

[英]Templating engines for Asp.net

是否有像Asp一样对php有用的Asp.net第三方模板引擎?

Your question does not explicitly states what "breed" of ASP.NET you are using, so I guess it is most likely web forms. 您的问题没有明确说明您使用的是哪种ASP.NET“品种”,因此我想它很可能是Web表单。 If this assumption is correct, I would not recommend for you to replace the default view engine. 如果此假设正确,则不建议您替换默认的视图引擎。 In order to make good use of the build in controls, you really want to keep the abstraction where HTML like elements can be marked runat=server and accessed from the server side code. 为了充分利用内置控件,您确实希望保留这样的抽象,即可以将类似HTML的元素标记为runat=server并从服务器端代码进行访问。

If you happen to use ASP.NET MVC, the picture is completely different. 如果碰巧使用ASP.NET MVC,则情况完全不同。 Here, there are lots of different view engines available - including NDjango , NHaml , Spark . 在这里,有很多可用的视图引擎 -包括NDjangoNHamlSpark If you are the type of web developer who care about the templating engines, you are likely to prefer ASP.NET MVC as a whole, and you might want to check it out before starting your next project. 如果您是关心模板引擎的Web开发人员,那么您可能更喜欢ASP.NET MVC作为一个整体,并且您可能想在开始下一个项目之前先进行检查

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM