TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
satheesh babu
NA
128
312.5k
exporting gridview to pdf and not exporting the text box values which is inside the grid view?
Apr 28 2011 6:10 AM
HI all,
I am using below code to export data grid view data to PDF and its working fine and i have a editable text box in the grid view(to enter payment amount). But this text box amount is not exporting to PDF.
Please help me on this issue. Below is my code
using iTextSharp.text;
using iTextSharp.text.pdf;
using iTextSharp.text.html;
using iTextSharp.text.html.simpleparser;
using System.Text;
using System.IO;
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=PENAL_INT_CUSTOMER_ID_FROMDATE_TOdATE.pdf");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
dgvPenal.AllowPaging = false;
dgvPenal.DataBind();
dgvPenal.RenderControl(hw);
StringReader sr = new StringReader(sw.ToString());
Document pdfDoc = new Document(PageSize.A4, 10f, 10f, 10f, 0f);
HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
pdfDoc.Open();
htmlparser.Parse(sr);
pdfDoc.Close();
Response.Write(pdfDoc);
Response.End();
Please help me...
Thank you
Reply
Answers (
1
)
Dynamic Creation of Directory in IIS is not working
Dynamic text box control creation and text_changed event code