how to write asp.net 2 code for file send page as email

Discussion in 'ASP .Net' started by =?Utf-8?B?RGF2ZSBT?=, Mar 19, 2006.

  1. I have a lot of forms on our web site that require the user to fill out
    information and submit it back to us. currently the information comes back as
    name value pair. The our employee's then has to go thru all this code and
    fill in a template with the data and print the info out. It would be so much
    easier if we could have a button that would access the file/send/page by
    email button on IE. Using asp.net 2 the my.computer.keyboard.sendkey is not
    available like it is in vb.net2.

    Since I can't find a way to make that work, I have try the following code
    which returns the form, but not the data the user typed in. How do i get the
    data to be put into the form? Thank you for any help you can give.

    Dim smtpClient As New System.Net.Mail.SmtpClient()
    Dim message As New System.Net.Mail.MailMessage()
    Dim pageget As String

    Try
    Dim fromAddress As New
    System.Net.Mail.MailAddress("", "MyName")
    pageget =
    readHtmlPage("http://localhost:1737/Wd-doc/Default2.aspx")
    smtpClient.Host = "smtp.mycompany.com"
    smtpClient.Port = 25
    message.From = fromAddress
    message.To.Add("")
    message.Subject = "Feedback"
    'Body can be Html or text format
    'Specify true if it is html message
    message.IsBodyHtml = False
    ' Message body content
    message.Body = pageget
    ' Send SMTP mail
    smtpClient.Send(message)
    Response.Write("Email successfully sent.")
    Catch ex As Exception
    Response.Write("Send Email Failed." + ex.Message)
    End Try

    --
    Dave S
    =?Utf-8?B?RGF2ZSBT?=, Mar 19, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter
    Replies:
    0
    Views:
    3,333
    Peter
    Jul 1, 2003
  2. blu3g85
    Replies:
    4
    Views:
    377
  3. C.W.
    Replies:
    0
    Views:
    290
  4. Replies:
    2
    Views:
    380
    Tintin
    Jan 5, 2007
  5. Replies:
    13
    Views:
    444
    Randy Webb
    May 14, 2006
Loading...

Share This Page