Posted on: 5/17/2013 5:48:30 AM | Views : 230

I am using below code to generate pdf of the invoice in asp.net. this code runs properly with one grid view in the panel but when i desigened the aspx page. and when i run the page it gives me error that "input string was not in correct format"

Code for generating pdf from aspx page using <asp:Panel> control
string attachment = "attachment; filename=" + "abc" + ".doc"; Response.ClearContent(); Response.AddHeader("content-disposition", attachment); Response.ContentType = "application/doc"; StringWriter s_tw = new StringWriter(); HtmlTextWriter h_textw = new HtmlTextWriter(s_tw); h_textw.AddStyleAttribute("font-size", "7pt"); h_textw.AddStyleAttribute("color", "Black"); Panel1.RenderControl(h_textw);//Name of the Panel ...

Go to the complete details ...