Click here to Skip to main content
11,709,366 members (42,314 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET CSS
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:
<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 22-Jun-12 4:31am
Edited 22-Jun-12 21:57pm
v2
Comments
SASS_Shooter at 22-Jun-12 15:20pm
   
What have you done so far?
Arunprasath Natarajan at 23-Jun-12 3:13am
   
I have used display.none in media print its not working

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 580
1 OriginalGriff 250
2 Maciej Los 225
3 Peter Leow 219
4 Mika Wendelius 160
0 OriginalGriff 9,428
1 Sergey Alexandrovich Kryukov 9,027
2 CPallini 5,189
3 Maciej Los 4,991
4 Mika Wendelius 3,856


Advertise | Privacy | Mobile
Web03 | 2.8.150819.1 | Last Updated 23 Jun 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100