I have a webform that contains a text box with a phone number, this form get emailed to an administrator, how do I get the phone number to display as (###) ###-#### in the email?
MailMessage message = new MailMessage(); message.To.Add("me@domain.com"); message.From = new MailAddress("NoReply@domain.com", "Do Not Reply"); message.Body = (tbClient.Text + "\nName: " + txt_name.Text + "\nCompany: " + txt_company.Text + "\nAddress: " + txt_address.Text + "\nCity: " + txt_city.Text + "\nState: " + ddl_state.SelectedItem + "\nZip: " + txt_zipcode.Text + "\nPhone: " + txt_phone.Text + "\nEmail: " + txt_email.Text + "\nUsername: " + txt_username.Text + "\nPass: " + txt_pass.Text); SmtpClient smtp = new SmtpClient("mail.domain.com"); smtp.Credentials = new System.Net.NetworkCredential("me@domain.com", "pass"); smtp.Port = 25; message.Priority = MailPriority.Normal; smtp.Send(message);
code behind.