Results 1 to 2 of 2

Thread: A little Help

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2002
    Location
    New Zealand
    Posts
    39

    A little Help

    Hi, I want to collect information from a couple of fields and when the user clicks the submit button, the entered information is sent to an email address.

  2. #2
    Member
    Join Date
    Sep 2001
    Location
    Fishburn
    Posts
    45
    Generally, sending e-mails is straight forward with ASP.NET...
    For example, on your apply button click event...
    Code:
    Private Sub cmdApply_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSearch.Click
    
    Dim NewMessage As New System.Web.Mail.MailMessage()
    NewMessage.To = "[email protected]"
    NewMessage.From = "[email protected]"
    NewMessage.Subject = "New information submitted"
    NewMessage.Body = txtBody.Text
    System.Web.Mail.SmtpMail.Send(NewMessage)
    End Sub
    So you can build the mail body using whatever text boxes you have added to your web page, above just sends whatever is entered into txtBody text box.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width