Hi,
In an aspx page, I've got a TreeView and a detail form and a print
button. When the user clicks on the print button, I'd like to collapse
the TreeView and send the page to the printer.
Using Javascript, the print is easy:
<asp:ImageButto n ID="btnPrint" runat="server" AlternateText=" Print"
ImageUrl="~/images/print.gif"
OnClientClick=" javascript:wind ow.print();retu rn false;" ToolTip="Print
page" />
However, I'm not able to combine the window.print() function with the
necessary method to collapse the TreeView (MyTreeView.Col lapseAll()).
Anyone who's got any pointers on how to combine the Javascript print-
function with the ASP.NET TreeView.Collap se method on a single button?
Thanks!
Regards,
-Haakon-
In an aspx page, I've got a TreeView and a detail form and a print
button. When the user clicks on the print button, I'd like to collapse
the TreeView and send the page to the printer.
Using Javascript, the print is easy:
<asp:ImageButto n ID="btnPrint" runat="server" AlternateText=" Print"
ImageUrl="~/images/print.gif"
OnClientClick=" javascript:wind ow.print();retu rn false;" ToolTip="Print
page" />
However, I'm not able to combine the window.print() function with the
necessary method to collapse the TreeView (MyTreeView.Col lapseAll()).
Anyone who's got any pointers on how to combine the Javascript print-
function with the ASP.NET TreeView.Collap se method on a single button?
Thanks!
Regards,
-Haakon-
Comment