473,568 Members | 2,762 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4777
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******** ******@TK2MSFTN GP09.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******** ******@TK2MSFTN GP10.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
2958
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 email by creating a text file, with content following certain format, and saving that file into the correct '..\mailroot\pickup' folder, and it is...
7
1487
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 to host a web site named jws.nowhere.local. Within II6 of server1, I created a new web site as to allow one to serf to jws.nowhere.local and see the...
11
1971
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 35 of these objects the form shows up BLANK in a web browser. When I remove a few (ANY few) I can see the page. Any ideas? Thanks.
17
2462
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 'Button19' of type 'Button' must be placed inside a form tag with runat=server Can the IDE not do what it is supposed to do. It seems that it is a...
2
1515
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 documentation I have read, there is nothing that describes the use of the forms action atribute. I did find text on the MSDN that describes the use...
2
4554
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 easy, but 1) How do I set about dynamically creating user controls (like TextBox, TextArea) --- simply Declare and initialised (new) the user...
0
2124
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 really fine. No problems at all. But, when this control is placed inside a template of an Infragistics UltraWebTab control, somethings stranges...
6
7835
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
7125
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 SQL database - can someone point me in the right direction please or refer me to a good example/pre written code? I am using Vista Business...
0
7604
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7916
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8117
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7660
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7962
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6275
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2101
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
932
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.