473,410 Members | 1,857 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,410 software developers and data experts.

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

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("XX*@mycompany.com", "MyName")
pageget =
readHtmlPage("http://localhost:1737/Wd-doc/Default2.aspx")
smtpClient.Host = "smtp.mycompany.com"
smtpClient.Port = 25
message.From = fromAddress
message.To.Add("XX*@Mycompany.com")
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
Mar 19 '06 #1
0 1647

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: jajoo | last post by:
Hi everyone, I am trying to send files with multipart/form-date. Everything is ok with the send. But when I am receiving the files I should specify a directory where the files to be saved. The...
18
by: jas | last post by:
Hi, I would like to start a new process and be able to read/write from/to it. I have tried things like... import subprocess as sp p = sp.Popen("cmd.exe", stdout=sp.PIPE)...
2
by: TJ | last post by:
Dear Sir/Madam I have made one user control to embed in Internet Explorer I just wrote one method to keep track log something like. public static void WriteLog(..) StreamWriter stWriter =...
11
by: Russ | last post by:
My web app writes some binary data to a file at the client site via Response.Write and Response.BinaryWrite. This action is accomplished in response to a button click, with C# code behind as...
3
by: Sabri AKIN | last post by:
Hi, I want to send ascx file's html code as email.this ascx file is summary of customer sale.and at last iwant to send email to customer.how can i get and past ascx file's html code to mail body.
1
by: raj.sinha | last post by:
I have to "PUT" data to a Unicode file... a file that has the "FF FE" mark at the beginning of the file. How do i do that. What HTTP header do i need to send so that the data is stored in the...
1
by: cwl | last post by:
I want to get the content of a webpage containing plain text and write the content to a text file. My code looks like this: Set xmlhttp = CreateObject("Microsoft.XMLHTTP")...
4
by: Ross | last post by:
Hello, I am trying to Read and Write to a text file on a web server using Microsoft Visual Basic 2005 Express Edition. So far I have managed to complete my testing with a local text file using...
1
by: jerger | last post by:
I have not made a program or page from start yet. I have made modifications to our signoff asp pages like changing the questions, texts, shortening field lengths etc... I also have copied the files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.