Sending a Form to HTML Email Using C# and asp.net 4.0
I often find myself needing to set up a form to email page on a website. For whatever reason, I am not able to always use the same code. So my latest code is included here. This code sends an HTML email from an asp.net 4 website using C#. using System; using System.Net; using System.Web.UI.WebControls; using System.Net.Mail; using System.Text; public partial class contact : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { txtFirstName.Focus(); } protected void btnSendMail_Click(object sender, EventArgs e) {…