title: Simple string templating in ASP.NET MVC
body: <p>I have a bunch of database log messages containing references like <code>Invoice 45</code> or <code>Case 123</code> which I want to parse to output links to the appropriate invoice or case when displaying to the user.</p>
  
  <p>These are fairly simple to parse with RegEx and replace with an action link using an ASCX display template, but is there a <em>right</em> way to do this? I imagine this means writing a parser to tokenise the string and prevent any potential circular references.</p>