473,320 Members | 2,094 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,320 software developers and data experts.

Creating HTML email from webform

Hi chaps!

I need to creat a confirmation email for an online shopping site. The email
needs to be in HTML and would have a lot of dynamic content in it relative
to the order that's just been placed.

I figured the easiest way to do this would be to create a webform that
recieves a URL parameter that contains the orderID, then builds the page and
populates it with the relevant info. Then I should just be able to rip out
the response to this web request into a string, right?

Well as far as I can see it's not that simple. I've spent the last day
playing about with streams from HttpWebResponse objects etc.... and haven't
got very far.

Has anybody else been able to do this? How do most people create dynamic
HTML emails?

Thanks in advance,

p-cresswell
Nov 15 '05 #1
3 4771
Have you checked out System.Web.Mail.MailMessage?

-Noah Coad
Microsoft MVP & MCP [.NET/C#]

"Peter Cresswell" <p-*********@iname.com> wrote in message
news:uw**************@TK2MSFTNGP09.phx.gbl...
Hi chaps!

I need to creat a confirmation email for an online shopping site. The email needs to be in HTML and would have a lot of dynamic content in it relative
to the order that's just been placed.

I figured the easiest way to do this would be to create a webform that
recieves a URL parameter that contains the orderID, then builds the page and populates it with the relevant info. Then I should just be able to rip out
the response to this web request into a string, right?

Well as far as I can see it's not that simple. I've spent the last day
playing about with streams from HttpWebResponse objects etc.... and haven't got very far.

Has anybody else been able to do this? How do most people create dynamic
HTML emails?

Thanks in advance,

p-cresswell

Nov 15 '05 #2


Yes I have been looking at that class and can send emails with it. But I
really want some code that will "screen scrape" the html out of a web
response, and then put it in a string so I can add it to myMail.Body.

Do you know how to do this?

So just to clarify...

I want the code to request -
http://localhost/confimationEmail.aspx?OrderID=10
And i want to put the html response from that request into a string.

Thanks again,

p-cresswell

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #3
I've found this article on CodeProject which tells me exactly what I needed
to know. The code looks a lot like what I had tried, the difference being
his works, mine didn't :-)
A big thank you to the author - Mark Nischalke

p-cresswell

"Peter Cresswell" <p-*********@iname.com> wrote in message
news:eH**************@TK2MSFTNGP10.phx.gbl...


Yes I have been looking at that class and can send emails with it. But I
really want some code that will "screen scrape" the html out of a web
response, and then put it in a string so I can add it to myMail.Body.

Do you know how to do this?

So just to clarify...

I want the code to request -
http://localhost/confimationEmail.aspx?OrderID=10
And i want to put the html response from that request into a string.

Thanks again,

p-cresswell

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 15 '05 #4

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

Similar topics

4
by: Francois Keyeux | last post by:
hello everyone: i have a web site built using vbasic active server scripting running on iis (it works on either iis 50 and 60, but is designed for iis 50) i know how to create a plain text...
7
by: Sam Carleton | last post by:
I am trying to figure out how to get VS.Net and IIS6 to work together... I am working in domain nowhere.local. I have a W2K3 server named server1.nowhere.local that is running IIS6. I want it...
11
by: VB Programmer | last post by:
Is there a limit as to how big an aspx page's html can be? (number of characters) Why do I ask? I have a webform with a lot of ActiveX controls (shows up as OBJECT in html). When I place like...
17
by: Lloyd Sheen | last post by:
This IDE is driving me nuts. I needed another button so I copied an existing one, changed the Text and the id and position by drag and drop. Well then I run and get the following: Control...
2
by: jlopes151 | last post by:
Question: I'm creating an ASP.NET webform and I have questions about how the ASP.NET form works. In ASP or HTML a form with an action will transfer that forms items to another page. From the...
2
by: Patrick | last post by:
I want to define a set of web-form templates in XML and render the equivalent web-form with ASP.NET, then process any input server controls on the form. Reading the XML file from Page_load is...
0
by: Ravi Ambros Wallau | last post by:
Hi: I've created a custom control - a grid that uses Infragistics to display some filters, the grid itself, and some buttons. Well, when using this control directly on WebForm, everything works...
6
by: Rolf Welskes | last post by:
Hello, if I have for example: <table style="width: 100%; height: 100%;" border="1"> <tr> <td style="width: 100px">k </td> <td style="width: 100px">k </td> </tr>
0
by: studentofknowledge | last post by:
hi my knowledgeable comrads I have created a web form using html, css with the addition of some basic javascript validation. Although now im having trouble to insert this information to my local...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.