E-Mailing a Web Form in HTML format.

M

Mattyw

Hi,

I have a WebForm that just consists of TextBoxes and Labels and I am
wondering what would be the best way to send the WebForm as an HTML
e-mail when the user clicks on a button event.

I am using VB and have so far been able to send the contents of a text
box in an e-mail's body using the System.Web.Mail namespace, I am using
Visual Studio.NET 2003.

I want the whole webform to be included in the e-mail as HTML so its
identical to the webform the user filled in.

I saw something about HTML rendering but can't quite get my head round
it.

Any VB examples would be much appreciated, I am assuming that this
should be quite a straightforward thing to do with the amount of public
facing websites that asks users for information in this way.

Many Thanks
MattyW
 
K

Karl Seguin

i have an example of how this can be done for a user control:
http://openmymind.net/FAQ.aspx?documentId=45

if you move your code into a user control and follow the example, you should
be able to get it to work.

Karl

P.S. - someone once told me that code was broken in a very trivial way,
can't remember if I ever fixed it ;)
 
M

Mattyw

Karl,

I need a bit more assistance!.

Where would the code in your example be placed?, is it in the user
control or in the actual webform that you
want to e-mail?.

Do the TextBoxes have to be in the User Control as well as the code?

Many Thanks,

Matt.
 
K

Karl Seguin

The code emails out the rendered content of a user control. The code itself
can be placed anywhere (like the button click event on a page). whatever
you want to have emailed, you place on the user control and use the code to
get the content to include in the email.

Karl
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,262
Messages
2,571,056
Members
48,769
Latest member
Clifft

Latest Threads

Top