SALVE RAGAZZI..SONO NUOVO, VI CHIEDO 1 AIUTO..
DA 2 SETTIMANE MI STANNO FACENDO MODIFICARE UN SITO WEB FATTO IN ASP.NET, PREMETTO KE IO UTILIZZO ASP, QUINDI HO 1 Pò DI PROBLEMI..
VI POSTO SUBITO IL PROBLEMA..
COME POTETE VEDERE IL FILES INVIA AD 1 SOLO DESTINATARIO,CIOè L'AMMINISTRATORE DEL SITO, IO DEVO AGGIUNGERE ANCHE UNA STRINGA X RIMANDARE LA FORM ANCHE A CHI SCRIVE DAL SITO..
MI DATE UNA MANO X FAVORE? IN + COME POSSO RENDERE I CAMPI DEL FORM OBBLIGATORI?
GRAZIE![]()
codice:using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Net.Mail; public partial class Contattaci : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void ButtoInvia_Click(object sender, EventArgs e) { string from = "cataloghi@wecantour.it"; string to = "cataloghi@wecantour.it"; string subject = "Richiesta Catalogo 2010 WeCanTour"; string body = "<div>Invio dalla pagina Richiesta catalogo 2010 WeCanTour</div>"; body = body + "<table width='36%' border='0' cellspacing='0' cellpadding='0'>"; body = body + "<tr><td width='29%'>Nome:</td><td width='71%'>" + this.TextBoxNome.Text + "</td>"; body = body + "</tr><tr><td>Cognome:</td><td>" + Cognome.Text + "</td></tr>"; body = body + "<tr><td>Email:</td><td>" + TextBoxEmail.Text + "</td></tr>"; body = body + "<tr><td>Ragione Sociale ADV:</td><td>" +TextBoxAzienda.Text + "</td></tr>"; body = body + "<tr><td>Cellulare:</td><td>" + TextBoxCellulare.Text + "</td></tr>"; body = body + "<tr><td>Telefono:</td><td>" + TextBoxTelefono.Text + "</td></tr>"; body = body + "<tr><td>Fax:</td><td>" + TextBoxFax.Text + "</td></tr>"; body = body + "<tr><td>Città:</td><td>" + TextBoxcitta.Text + "</td></tr>"; body = body + "<tr><td>Indirizzo:</td><td>" + TextBoxindirizzo.Text + "</td></tr>"; body = body + "<tr><td>CAP:</td><td>" + TextBoxCAP.Text + "</td></tr>"; body = body + "<tr><td>Provincia:</td><td>" + TextBoxprovincia.Text + "</td></tr>"; body = body + "<tr><td>Note:</td><td>" + TextBox2.Text + "</td></tr>"; body = body + "</table>"; MailMessage EMAIL = new MailMessage(from, to, subject, body); EMAIL.IsBodyHtml = true; EMAIL.Priority = MailPriority.High; // ALTA PRIORITA' System.Net.Mail.SmtpClient smtpMail = new SmtpClient("smtp.aruba.it"); try { smtpMail.Send(EMAIL); this.TextBoxEmail.Text = ""; this.TextBoxAzienda.Text = ""; this.TextBoxCellulare.Text = ""; this.TextBoxTelefono.Text = ""; this.TextBoxFax.Text = ""; this.TextBoxcitta.Text = ""; this.TextBoxindirizzo.Text = ""; this.TextBoxCAP.Text = ""; this.TextBoxprovincia.Text = ""; this.Cognome.Text = ""; this.TextBox2.Text = ""; this.TextBoxNome.Text = ""; Label1.ForeColor = System.Drawing.Color.Black; Label1.Text = "La Sua richiesta è stata inviata con successo."; Label1.Visible = true; } catch { this.TextBoxEmail.Text = ""; this.TextBoxAzienda.Text = ""; this.TextBoxCellulare.Text = ""; this.TextBoxTelefono.Text = ""; this.TextBoxFax.Text = ""; this.TextBoxcitta.Text = ""; this.TextBoxindirizzo.Text = ""; this.TextBoxCAP.Text = ""; this.TextBoxprovincia.Text = ""; this.Cognome.Text = ""; this.TextBox2.Text = ""; this.TextBoxNome.Text = ""; Label1.ForeColor = System.Drawing.Color.Red; Label1.Text = "Errore durante l'invio del maessaggio"; Label1.Visible = true; } } }