0
Answer

who to load a ms chart control from a current page to new page.(client side)

vinoth Ezhilan M

vinoth Ezhilan M

11y
1.2k
1
javascript 

var divToPrint = document.getElementById('<%= Page.Master.FindControl("ContentPlaceHolder2").FindControl("divReport").ClientID %>'); ;
 var newWin = window.open('', '_blank', features);
 newWin.document.open();
 newWin.document.write('<html><head></head><body onload= "window.print()">' + divToPrint.innerHTML + '</body></html>'); 
 newWin.document.close();
 newWin.focus();




and "divreport" contains a ms chart control(c# asp.net).


the above code ll display the chart control in new page and opens the print window when it opens.

My question is, the chart control is not loading some times...
actually the cahrt control by itself change as an image and it ll get loaded on other page(since im using html).

pls give me some solutions..

or

tell me  some other possibilities to print the selected div content with print preview option.