Hey
I am making a system where I need to print a adress lable. I am generating a html code from codebehind ("<h4>" + userName + "</h4><p>" + adress + "<br/>" + zipCity + "</p>"), I have tryede it with this:
private void PrintWebControl(Control ControlToPrint)
{
StringWriter stringWrite = new StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new System.Web.UI.HtmlTextWriter(stringWrite);
if (ControlToPrint is WebControl)
{
Unit w = new Unit(100, UnitType.Percentage);
((WebControl)ControlToPrint).Width = w;
}
Page pg = new Page();
pg.EnableEventValidation = false;
HtmlForm frm = new HtmlF ...
Go to the complete details ...