473,387 Members | 1,678 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,387 software developers and data experts.

How send email of resulting aspx page?

I created a rtf html newsletter editor using ASP.NET. It has a preview
button which previews the resulting newletter. The "preview" page basically
has tables with labels in it. I fill in the labels with data from the db.

Question: How do I email the resulting "preview" page, with everything
filled in?

Thanks.
Nov 19 '05 #1
5 1666
"VB Programmer" <xD**********@Dont.com> wrote in news:uawQo9uQFHA.2520
@tk2msftngp13.phx.gbl:
Question: How do I email the resulting "preview" page, with everything
filled in?


You'll need to regenerate the table before you e-mail. Basically build HTML
from scratch.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #2
Any way to simply get the resulting HTML then store it in a session var then
make it the message body?

"Lucas Tam" <RE********@rogers.com> wrote in message
news:Xn***************************@127.0.0.1...
"VB Programmer" <xD**********@Dont.com> wrote in news:uawQo9uQFHA.2520
@tk2msftngp13.phx.gbl:
Question: How do I email the resulting "preview" page, with everything
filled in?


You'll need to regenerate the table before you e-mail. Basically build
HTML
from scratch.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Nov 19 '05 #3
"VB Programmer" <xD**********@Dont.com> wrote in
news:Oo*************@TK2MSFTNGP15.phx.gbl:
Any way to simply get the resulting HTML then store it in a session
var then make it the message body?


You theoretically could... by inheriting the page class and capturing the
rewriting the render portion... but ASP.NET's HTML is not optimized for e-
mail - it contains a lot of tags such as Viewstate which would bloat and e-
mail (and probably won't display properly in a lot of e-mail clients).

If you *REALLY* wanted to use ASP.NET's output... take a look at screen
scarping:

http://www.4guysfromrolla.com/webtech/070601-1.shtml

But generally speaking, scraping ASP.NET HTML for e-mail use is a bad idea.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #4
You can email a page by using the WebRequest and MailMessage classes.

Here are a couple examples:
http://www.aspalliance.com/stevesmit...ailwebsite.asp
http://aspnet.4guysfromrolla.com/articles/091102-1.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"VB Programmer" <xD**********@Dont.com> wrote in message
news:ua**************@tk2msftngp13.phx.gbl...
I created a rtf html newsletter editor using ASP.NET. It has a preview
button which previews the resulting newletter. The "preview" page
basically has tables with labels in it. I fill in the labels with data
from the db.

Question: How do I email the resulting "preview" page, with everything
filled in?

Thanks.

Nov 19 '05 #5
Steve, as usual great response! You are so helpful to the community. I
will check out the links.

Thanks.

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:uk**************@TK2MSFTNGP15.phx.gbl...
You can email a page by using the WebRequest and MailMessage classes.

Here are a couple examples:
http://www.aspalliance.com/stevesmit...ailwebsite.asp
http://aspnet.4guysfromrolla.com/articles/091102-1.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"VB Programmer" <xD**********@Dont.com> wrote in message
news:ua**************@tk2msftngp13.phx.gbl...
I created a rtf html newsletter editor using ASP.NET. It has a preview
button which previews the resulting newletter. The "preview" page
basically has tables with labels in it. I fill in the labels with data
from the db.

Question: How do I email the resulting "preview" page, with everything
filled in?

Thanks.


Nov 19 '05 #6

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

Similar topics

0
by: Chris | last post by:
I am trying to simply accept user input from a text field and email that text to a recipient while bcc'ing another recipient. Sounds simple enough but I am getting strange results such as: 1....
1
by: Lewis | last post by:
Hi, Im having a problem with an aspx page that I'm building (and rather urgently needing to complete!). Situation is this... Im transforming some XML using an XSLT which builds an HTML form...
1
by: Pai | last post by:
Hello there, I have crated an HTML mail with a button in the mail body, an a few values like the name of the person his city state..... When I click on the button I need the specific contents ...
3
by: Adam Pedder | last post by:
I'm trying to send an aspx page by email. I am quite happy sending html email from aspx pages but want to know is there is a straight forward way to render a whole page to an email? I have found...
0
by: Syed Aun Ali | last post by:
i am running an asp.net application on a IIs server with some clients connected through local network and Tcp/ip.i want to send data from a textbox control on a aspx page of a client machine to a...
1
by: | last post by:
hi to all how can I call and send parameter a aspx page with a c sharp class?
3
by: Tatyana | last post by:
Hello, I was wondering if anybody knows how to disable Email Sending on Page Refresh. When shopper submits the order he/she is being redirected to the receipt page and gets the email...
1
by: Hardy Wang | last post by:
I got error message "Asynchronous operations are not allowed in this context. Page starting an asynchronous operation has to have the Async attribute set to true and an asynchronous operation can...
5
by: Sudantha | last post by:
My requirement is to enhance the mail sending capability of a web application using a well formatted .aspx page as the template. I use C# ASP.NET. Please provide an idea.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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...

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.