public class PrintHelper
{
public PrintHelper()
{
}
public static void PrintWebControl(Control ctrl, string Header, string Date)
{
Label lblHeader = new Label();
lblHeader.Text = "MSJ Bank Financial - " + Header + " (" + Date + ")<br/><hr/><br/>";
PrintWebControl(ctrl, lblHeader, string.Empty);
}
//Print Method
public static void PrintWebControl(Control ctrl, Label lblHeader, string Script)
{
StringWriter stringWrite = new StringWriter();
HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
if (ctrl is WebControl)
{
Unit w = new Unit(100, UnitType.Percentage);
((WebControl)ctrl).Width = w;
}
Page pg = new Page();
pg.EnableEventValidation ...
Go to the complete details ...