title: NVelocity ASP.NET Examples
body: <p>I'm looking to use NVelocity in my ASP.NET MVC application, not as a view engine, just for rendering some email templates.</p>
  
  <p>However, I cannot for the life of me get it to work. I have downloaded it from the castle project and followed the example at <a href="http://www.castleproject.org/others/nvelocity/usingit.html#step1" rel="nofollow noreferrer">http://www.castleproject.org/others/nvelocity/usingit.html#step1</a></p>
  
  <p>No matter what I try I don't seem to be able to load a template located in my site. The example suggests using the absolute path, which I have tried to no avail:</p>
  
  <pre><code>Template t = engine.GetTemplate("/Templates/TestEmail.vm");
  </code></pre>
  
  <p>So please can someone give me two examples. One of loading a template located in the web site directory and secondly one parsing a string variable (as it is likely that my templates will be stored in a database).</p>
  
  <p>Many thanks
  Ben</p>