title: ASP.NET C# Insert Html code in Email
body: <p>I can't understand a fact...
  I've created a form to send email and it goes really well.
  Now i've extended a textbox with an extended html of ajax control toolkit and, when I receive the email, I don't see all the code... i make an example.
  I've sent this:</p>
  
  <p><code>&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td rowspan="2"&gt; &lt;/td&gt;&lt;td&gt;&lt;b&gt;LA QUALITA' ALPITOUR&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;</code></p>
  
  <p>and in the email i see only the text bolded... all the other code is written and visible... why?
  I hope I've explained my problem well... I'm not english and I don't write it very well.</p>
  
  <p>if it is needed, this is my code-behind:</p>
  
  <pre><code>protected void Btn_SendMail_Click(object sender, EventArgs e)
  {
      MailMessage msg = new MailMessage();
      msg.From = new MailAddress("danieleluciani92@gmail.com");
      msg.To.Add("danieleluciani92@gmail.com");
      msg.Subject = txtSubject.Text;
      msg.IsBodyHtml = true;
      msg.Body = txtBody.Text;
      SmtpClient sc = new SmtpClient("smtp.gmail.com");
      sc.Port = 25;
      sc.Credentials = new NetworkCredential("danieleluciani92@gmail.com", "Dead2006!");
      sc.EnableSsl = true;
      sc.Send(msg);
      Response.Write("&lt;script&gt;alert('ennamo');&lt;/script&gt;");
  }
  </code></pre>
  
  <p>and this is my html/asp code:</p>
  
  <pre><code>&lt;asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"&gt;
  &lt;span class="fontS"&gt;A:
      &lt;asp:TextBox ID="txtTo" runat="server" Font-Size="X-Small" ReadOnly="True"&gt;Tutti Gli Utenti&lt;/asp:TextBox&gt;
      &lt;br /&gt;
      Oggetto:
      &lt;asp:TextBox ID="txtSubject" runat="server" Font-Size="X-Small" /&gt;&lt;br /&gt;
      &lt;asp:ScriptManager ID="ScriptManager1" runat="server" /&gt;
      &lt;/span&gt;
  &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server"&gt;
      &lt;ContentTemplate&gt;
          &lt;span class="fontS"&gt;Tipo di Email:&lt;/span&gt;&lt;asp:DropDownList ID="DropDownList1" runat="server" Font-Size="X-Small" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"&gt;
              &lt;asp:ListItem Selected="True"&gt;Testo Libero&lt;/asp:ListItem&gt;
              &lt;asp:ListItem&gt;Email Con Offerte&lt;/asp:ListItem&gt;
          &lt;/asp:DropDownList&gt;
          &lt;br /&gt;
          &lt;asp:CheckBoxList ID="CheckBoxList1" runat="server" Visible="False" AutoPostBack="True" OnSelectedIndexChanged="CheckBoxList1_SelectedIndexChanged"&gt;
          &lt;/asp:CheckBoxList&gt;
          &lt;br /&gt;
          &lt;asp:TextBox ID="txtBody" runat="server" Height="550px" TextMode="MultiLine" Width="900px" /&gt;
          &lt;asp:HtmlEditorExtender ID="txtBody_HtmlEditorExtender" runat="server" TargetControlID="txtBody" EnableSanitization="False"&gt;
          &lt;/asp:HtmlEditorExtender&gt;
      &lt;/ContentTemplate&gt;
  &lt;/asp:UpdatePanel&gt;
  &lt;br /&gt;
  &lt;asp:Button ID="Btn_SendMail" runat="server" OnClick="Btn_SendMail_Click" Text="Invia" /&gt;&lt;br /&gt;
  </code></pre>
  
  <p></p>
  
  <p>Thanks before for your answers!</p>