Ciao a tutti, ho usato il Wizard per creare un modulo per l'invio di dati dal mio sito alla mia casella email però mi compare questo errore che non riesco a correggere:
Partial Class modulo_informazioni_Default
Inherits System.Web.UI.Page
Protected Sub TextBox7_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtTelefono.TextChanged
End Sub
Protected Sub txtCategoria_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtDescrizione.TextChanged
End Sub
Protected Sub CustomValidator1_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate
End Sub
Protected Sub Wizard1_FinishButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArg s) Handles Wizard1.FinishButtonClick
SendMail(txtCognome.Text, txtNome.Text)
End Sub
Private Sub SendMail(ByVal from As String, ByVal body As String)
Dim mailServerName As String = "localhost"
Dim message As MailMessage = New MailMessage(from, "info@pgtopteam.com", "feedback", body)
Dim mailClient As SmtpClient = New SmtpClient
mailClient.Host = mailServerName
mailClient.Send(message)
message.Dispose()
End Sub
End Class
L'errore è alla riga in Grassetto. Grazie per l'aiuto

Rispondi quotando