Add header File
using System.Net.Mail
Then on Sbmit Button Click...write the code
protected void Button1_Click(object sender, EventArgs e)
{
string Name = Txtname.Text;
string Email = Txtemail.Text;
string Phone = Txtphone.Text;
string Country = Txtcountry.Text;
string Comments = Txtcomments.Text;
MailMessage Msg = new MailMessage();
Msg.From = new MailAddress("youremail@gmail.com");
Msg.To.Add("youremail@gmail.com");
Msg.Subject = "Query";
string body = " Name: " + Name + "<br/>";
body += "Email: " + Email + "<br/>";
body += "Phone : " + Phone + "<br/>";
body += "Country: " + Country + "<br/>";
body += "Comments: " + Comments + "<br/>";
Msg.Body = body;
Msg.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.Port = 587;
smtp.Credentials = new System.Net.NetworkCredential("youremail@gmail.com", "yourpassword");
smtp.EnableSsl = true;
smtp.Send(Msg);
Response.Write("<script language='javascript'>alert('Your Query is Submitted!!')</script>");
Name = string.Empty;
Phone = string.Empty;
Email = string.Empty;
Country = string.Empty;
Comments = string.Empty;
}