how to save data from web form

  • 13 years ago

    I am developing a website which also contains data to be entered by visitors, in a Booking form and Enquiry form.

    What I would like to know is:

    How do I save the information entered by visitors, so that it can be viewed in the backend for future use. Also how to send an automated emails response after the forms are filled up.

    Many thanks in advance!!!


  • 13 years ago
    For saving you need to insert all the values in the database.
    First establish a connection like this.
      Dim con As New SqlConnection("user id=sa;pwd=mssi@123;server=PHPDEVELOP;database=onlinegre")
    Next write the sqlcommand for inserting.

    For mail sending

    Imports System.Web.Mail
    Dim mail As New MailMessage
            Dim mailvalue, password As String
            mailvalue = emailid.Text 'emailid.Text is the name of text box in which you enter mail address
            mail.To = mailvalue ' to whom you sent.
            mail.From = ""
            mail.Subject = "Your Gre Online Login Information"
            mail.Body = "Welcome Your Login id is:" & emailid.Text
            SmtpMail.SmtpServer = "" 'your real server goes here

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“If debugging is the process of removing software bugs, then programming must be the process of putting them in.” - Edsger Dijkstra