add this name space
using System.Web.Mail;
this code below in button
MailMessage mail = new MailMessage();
mail.To = "mail_id";
mail.To = "info@twinkle.in";
mail.From = "Twinkle";
mail.Subject = "for a query";
mail.Body = "First Name: " + TextBox1.Text + "\n Last Name: " + TextBox2.Text;
SmtpMail.SmtpServer = "your server";
try
{
SmtpMail.Send(mail);
mail send succesffully
}
catch
{
mail send not succesffully
}