I am using a text box in my application(webpage).i would like to know a basic information. if a person enters a text in that textbox how shall i move that to my code.
thanx in advance
srik
CODE
protected void Button1_Click(object sender, EventArgs e)
{
System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();
System.Net.NetworkCredential cred = new System.Net.NetworkCredential("from@gmail.com", "password");
mail.To.Add("to@gmail.com");
mail.Subject = "subject goes here";
mail.From = new System.Net.Mail.MailAddress("from@gmail.com");
mail.IsBodyHtml = true;
mail.Body = "hi this is a test mail";
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("smtp.gmail.com");
smtp.UseDefaultCredentials = false;
smtp.EnableSsl = true;
smtp.Credentials = cred;
smtp.Port = 587;
smtp.Send(mail);
}
how to make the to address as a textboxentry