in the i got few problems please solve to help me
also send information regarding email sending.
Try
Dim mailbody As String
mailbody = ""
mailbody = mailbody & "Company Name : " & txtcomp.Text
mailbody = mailbody & "contact name:" & txtcont.Text
mailbody = mailbody & "Address:" & txtadd.Text
mailbody = mailbody & "website:" & txtweb.Text
mailbody = mailbody & "code:" & txtcode.Text
Dim ToAddress As String = txtto.Text
txtfrom.Text = txtfrom.Text
Dim mm As New MailMessage(txtfrom.Text, ToAddress)
mm.Subject = "hi"
mm.Body = mailbody
mm.IsBodyHtml = False
Dim smtp As New SmtpClient
smtp.Send(mm)
ClientScript.RegisterStartupScript(Me.GetType(), "Hi User!", String.Format("alert('Your email has successfully been sent to {0}');", ToAddress.Replace("'", "\'")), True)
Catch smtpEx As SmtpException
'A problem occurred when sending the email message
ClientScript.RegisterStartupScript(Me.GetType(), "OhCrap", String.Format("alert('There was a problem in sending the email: {0}');", smtpEx.Message.Replace("'", "\'")), True)
Catch generalEx As Exception
'Some other problem occurred
ClientScript.RegisterStartupScript(Me.GetType(), "OhCrap", String.Format("alert('There was a general problem: {0}');", generalEx.Message.Replace("'", "\'")), True)
End Try