title: Retrieve HTML from Web.Config in Code-Behind
body: <p><strong>Web.Config:</strong></p>
  
  <pre><code>&lt;appSettings&gt;
      &lt;add key="html1" value="This is &amp;lt;br /&amp;gt; HTML email"/&gt;
  &lt;/appSettings&gt;
  </code></pre>
  
  <p>I'm trying to generate HTML formatted email. Prior to putting data in Web.Config I had both text and HTML emails formatted correctly.</p>
  
  <p><strong>In code-behind:</strong></p>
  
  <pre><code>StringBuilder emailMessageString = new StringBuilder();
  emailMessageString.Append(WebConfigurationManager.AppSettings["html1"].ToString());
  </code></pre>
  
  <p><strong>Output in HTML email:</strong></p>
  
  <p>This is &lt;br /&gt; HTML email</p>
  
  <p><strong>Expected output in HTML email:</strong></p>
  
  <p>This is</p>
  
  <p>HTML email</p>
  
  <p><strong>UPDATE - 02-19-2015</strong></p>
  
  <p>It looks like code I wrote to generate HTML email is not working correctly and had previously posted the code in this question (in my own answer). Can someone spot what I'm doing wrong as it looks like only the text emails are working:</p>
  
  <p><a href="https://stackoverflow.com/questions/27391070/correct-syntax-for-generating-html-email-using-alternateview">Correct Syntax for Generating HTML Email using AlternateView</a></p>