You can use the System.Net.WebClient class to post to the page and get the
results:
WebClient client = new WebClient();
client.Headers.Add(...);
Stream output = client.OpenRead(...);
StreamReader outputReader = new StreamReader(output);
string outputString = outputReader.ReadToEnd();
// use this string to create your email
--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--
"NWx" <te**@test.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi,
I want to send html mail from my asp net application.
But I'd like to let aspnet generate the HTML mailbody for me instead of
creating it myself.
So, is there any way to "capture" the result of a ASPX page to a string
variable instead of sending it to the client browser?
I want to assign this string to mailbody then, to send it by mail.
Also, how can I force the aspx to include full URL to resource instead of
just relative path?
Thank you