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 = "radha@materialsoft.com"
            mail.Subject = "Your Gre Online Login Information"
            mail.Body = "Welcome Your Login id is:" & emailid.Text
            SmtpMail.SmtpServer = "materialsoft.com.xohost.com" 'your real server goes here
            SmtpMail.Send(mail)


















Post a reply

Enter your message below

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

Contribute

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