使用剃刀无需MVC [英] Using Razor without MVC

查看:100
本文介绍了使用剃刀无需MVC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:结果
  <一href=\"http://stackoverflow.com/questions/3628895/is-it-possible-to-use-razor-view-engine-outside-asp-net\">Is有可能使用的Razor视图引擎之外asp.net

我需要与数据合并模板在运行时创建的唯一字符串。有人建议我看自带的剃刀模板视图引擎在ASP.NET MVC 3看起来不错,但我需要使用它的MVC视图创建之外。

I need to merge templates with data to create unique strings at runtime. It was suggested that I look at the Razor templating view engine that comes in ASP.NET MVC 3. Looks great, but I need to use it outside of MVC view creation.

我知道我可以直接使用核心剃刀引擎,但我​​也发现了几个项目,使用户使用剃刀直接更容易。这样的:

I know I can use the core Razor engine directly, but I've also found a couple of projects that make using Razor directly easier. Like:


  1. 里克施特拉尔剃刀主机模板
    发动机-
    <一href=\"http://www.west-wind.com/weblog/posts/864461.aspx\">http://www.west-wind.com/weblog/posts/864461.aspx

  2. 剃刀引擎上codePLEX - HTTP://razorengine.$c$cplex.com/

  1. Rick Strahl's Razor Hosting Template Engine- http://www.west-wind.com/weblog/posts/864461.aspx
  2. Razor Engine on Codeplex - http://razorengine.codeplex.com/

有没有人对使用MVC之外剃须刀作为一个独立的模板引擎的指导?与这些包装项目的经验吗?是否有其他剃须刀托管实现我应该看看?

Does anyone have any guidance on using Razor outside of MVC as a standalone template engine? Any experience with these wrapper projects? are there other Razor hosting implementations I should look into?

推荐答案

另外看看这个问题:<一href=\"http://stackoverflow.com/questions/3628895/is-it-possible-to-use-razor-view-engine-outside-asp-net\">Is有可能使用的Razor视图引擎之外asp.net

这篇关于使用剃刀无需MVC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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