title: ASP.NET Input string was not in a correct format
body: <p>I have made a control that creates an electronic invite to an event.  The user inputs their information into textboxes and the system gathers that information, adds it to the HTML for the email and then sends it.</p>
  
  <p>I am encountering an error when I combine all the parts.  My code is below.</p>
  
  <pre><code>protected void Button1_Click(object sender, EventArgs e)
   {
      SmtpClient smtpClient = new SmtpClient();
      MailMessage message = new MailMessage();
  
      MailAddress fromAddress = new MailAddress(YourEmailBox.Text, YourNameBox.Text);
  
      message.From = fromAddress;
  
      message.To.Add(FriendEmailBox.Text);
      message.Subject = EmailSubject;
      message.IsBodyHtml = true;
      message.Body = "&lt;html&gt;" + string.Format(EmailBody, YourNameBox.Text, PersonalNoteBox.Text) + "&lt;/html&gt;";
      smtpClient.Send(message);
  
      YourNameBox.Text = YourEmailBox.Text = FriendNameBox.Text = FriendEmailBox.Text = PersonalNoteBox.Text = string.Empty;
      Label1.Text = "Email Successfully sent!";
  
  }
  </code></pre>
  
  <p>It is giving me the input string was not in a correct format error on this line:</p>
  
  <p><code>message.Body = "&lt;html&gt;" + string.Format(EmailBody, YourNameBox.Text, PersonalNoteBox.Text) + "&lt;/body&gt;&lt;/html&gt;";</code></p>
  
  <p>Will you please help me out?</p>