Hi, I'm trying to print an aspx page, however I only want it to print the contents inside the editable content placeholder. The reason for this is because I don't want to print the whole web page including the menu bar and logo.
In the placeholder there is a graph and a grid view.
I'm unsure whether I should tackle this problem in javascript or C#.
Thank you for your help in advance.
Loading
Rimi JainPosted Feb 28, 2013, 7:57 AM
Hide controls which are not to be printed and show them again when printing is done.
Eg:
function Print(obj) {
document.getElementById('btClose').style.display = "none";
window.print(obj);
document.getElementById('btClose').style.display = "block";
}
The "obj" will be printed and button "btClose" will hide and show.
Rimi