Last post Mar 18, 2008 11:09 PM by Vince Xu - MSFT
Mar 17, 2008 12:18 PM|vishus4|LINK
i have a webform which collects some data from the user and some from the database .i want to send this form a particular user . i can also afford to send this in a pdf format.any ways to implement this? please advice? i am a newbie to asp.net?
Mar 17, 2008 12:29 PM|novicehere|LINK
sorry to ask you like this but what do you mean by send web form as an email. do you want your email body to contain a the web form........sorry just confused, can you please describe more
Mar 17, 2008 01:19 PM|bobmmp|LINK
Here is a simple tutorial
Mar 17, 2008 01:29 PM|vishus4|LINK
Mar 17, 2008 01:46 PM|bobmmp|LINK
You will need to send the form in html format. Depending on how complex the page is, it can be a nightmare.
Have you considered sending a link with all of the parameters to the page?
Mar 17, 2008 01:47 PM|PWick|LINK
Are you wanting to just send the information from the database and the form as an email?
Or are you wanting to send them an email with the form inside it? (If so, use an html email and an iFrame)
Mar 17, 2008 02:40 PM|Jahedx99|LINK
do a HttpWebRequest, and get the HttpWebResponse. Then put it into a StringBuilder and write it to the body of your email
//Sample psuedo code
HttpWebRequest wr = new HttpWebRequest( "FormURL" );
HttpWebResponse wres = wr.GetResponse();
StringBuilder sb = new StringBuilder();
sb.append( wres.ToString() );
Mar 17, 2008 02:56 PM|vishus4|LINK
can any one tell me the method to save this as a pdf document then i ill attach the document a nd send as a mail. i want the form just like that ,is there any way to do that
Mar 17, 2008 03:13 PM|Jahedx99|LINK
Sending it as a pdf, hmm... are you going to use ghostpdf, or some pdf driver to convert the html to a pdf?
Mar 18, 2008 11:09 PM|Vince Xu - MSFT|LINK
To save your page as pdf file and send mail with it, you can follow the below steps.
1. Use Third-Party control to create a pdf file with datas from page. And save it on server.
There are lots of Third-Party Control to achieve it. One of them is ABCPDF.NET which is convenient to use.
You can try it to operate and read/create your PDF file. There is a link to download:
There is a great demo available in the above link and you can learn how to use it.
2. Send mail with this pdf file.
Please check this post:
Hope this can help.