Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,

I am using the TabContainer in my page.
I am using Window.print to print the display part but I want to hide TabContainer in the print preview.
Kindly guide me on this.

Eg:
XML
<asp:TabContainer ID="TabContainer1" runat="server" Width="1300px" ActiveTabIndex="0">
        <asp:TabPanel ID="TabPanel1" runat="server">
            <HeaderTemplate>
                Engg.(Teaching)
            </HeaderTemplate>
            <ContentTemplate>
                <asp:DropDownList ID="DropDownList1" runat="server">
                    <asp:ListItem>January</asp:ListItem>
                    <asp:ListItem>February</asp:ListItem>
                    <asp:ListItem>March</asp:ListItem>
                    <asp:ListItem>April</asp:ListItem>
                    <asp:ListItem>May</asp:ListItem>
                    <asp:ListItem>June</asp:ListItem>
                    <asp:ListItem>July</asp:ListItem>
                    <asp:ListItem>August</asp:ListItem>
                    <asp:ListItem>September</asp:ListItem>
                    <asp:ListItem>October</asp:ListItem>
                    <asp:ListItem>November</asp:ListItem>
                    <asp:ListItem>December</asp:ListItem>
                </asp:DropDownList>


In this I want to hide HeaderTemplate.. Please Guide me..
Posted
Updated 22-Jun-12 21:57pm
v2
Comments
SASS_Shooter 22-Jun-12 15:20pm    
What have you done so far?
Arunprasath Natarajan 23-Jun-12 3:13am    
I have used display.none in media print its not working

1 solution

Hi,

If you are going to print the page using 'window.print()' function, definitely it will print all the content of the page.
So, as per my suggestion you should use crystal reports for printing the important pages. You can customize the pages as per your choice. For using crystal reports read these articles:
Step by Step Creation of Crystal Report using its Features Group, Graph, Cross-Tab and Sub Report[^]
Generate a Report using Crystal Reports in Visual Studio 2010[^]
All the best.
--AK
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900