title: HTTPmodule - Replacing Markup
body: <p>I have created an HTTPModule that is being called for every request to my website. Inside the module I have created my own filter wrapper for HTTPApplication.Context.Response.Filter that allows me to manipulate the markup just before it is sent back to the client.</p>
  
  <p>The idea here is that I am going to search for certain words/phrases and replace them with the same word/phrase in a given language which will be stored in a database.</p>
  
  <p>One of the words I am trying to replace is "Password". The problem is that there are controls in the markup called _ctl122_txtPassword and when I am in my filter I am literally just doing string manipulation (search/replace/etc.) so the control name gets renamed to _ctl122_txtTranslation which breaks all kinds of things.</p>
  
  <p>So I dont want to replace matches in this:
      <code>&lt;input type="password" style="width: 200px;" class="formfield" id="_ctl22_txtPassword" name="_ctl22:txtPassword"&gt;</code></p>
  
  <p>but I do want to replace matches in this:
  <code>&lt;td align="right" class="formlabel"&gt;Password:&lt;/td&gt;</code></p>
  
  <p>I have tried a few RegEx solutions but I am far from a RegEx ninja so this could be the way to go but I just dont know them well enough.</p>
  
  <p>The only other alternative I have tried is actually replacing the string '>Password'.</p>
  
  <p>Thanks in advance for the help.</p>