title: Search keyword highlight in ASP.Net
body: <p>I am outputting a list of search results for a given string of keywords, and I want any matching keywords in my search results to be highlighted. Each word should be wrapped in a span or similar. I am looking for an efficient function to do this.</p>
  
  <p>E.g.</p>
  
  <p>Keywords: "lorem ipsum"</p>
  
  <p>Result: "Some text containing lorem and ipsum"</p>
  
  <p>Desired HTML output: "<code>Some text containing &lt;span class="hit"&gt;lorem&lt;/span&gt; and &lt;span class="hit"&gt;ipsum&lt;/span&gt;</code>"</p>
  
  <p>My results are case insensitive.</p>