title: Encoding string for apostrophe in asp.net
body: <p>I am having a problem trying to resolve an apostrophe related issue.<br>
  I have searched SO, but could not find anything that would help me.</p>
  
  <p>My clientside javascript code is:  </p>
  
  <pre><code>var strUserText = uSettings.replace(/'/g, "&amp;apos;")  
  </code></pre>
  
  <p>after the above line is executed, the form does a submit  </p>
  
  <pre><code>document.form1.submit();  
  </code></pre>
  
  <p>in code behind, a class retreives those values:  </p>
  
  <pre><code>sUserSettings = request.form("strUserSettings ")  
  </code></pre>
  
  <p>the result is a semi-truncated string.<br>
  Given the above code process flow, how can I save <strong>"John O'Brady's ASP Blog"</strong> in to a database?  </p>
  
  <p>I thought I was saving "John O&apos;Brady&apos;s ASP Blog" but that isn't working.</p>