支持 aspx 语法的 Template 引擎

March 28th, 2005

最近需要一个 .NET 下的 Template 引擎来支持自定义网页模版。一般如 Velocity(java), Smarty(php) 等 Template 引擎都自带一套语法。而 CodeSmith 的概念是用 ASPX 语法。这个概念卖点不仅仅在于能直接用已经熟悉了的ASPX 语法,还在于能嵌入 inline code,并且能用 server control,例如 DataGrid DataList 和 Repeater。Template 本身可以用 WebMatrix 来编辑。所以是很酷的设计。

m3rlin 中找到了 hosting the ASP.NET runtime 的办法,包括创建新的 AppDomain 和 通过 HttpContext 传递数据等等。这样我有了能用在 windows forms 程序中的支持 ASPX 语法的 Template 引擎。

ps. Template 引擎通常可以用来做代码生成工具的核心。

Entry Filed under: Programming

1 Comment Add your own

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

February 2012
M T W T F S S
« Feb    
 12345
6789101112
13141516171819
20212223242526
272829  

Most Recent Posts


1