title: ASP.Net Printer Friendly Page
body: <p>Morning All,</p>
  
  <p>I am trying to make a web page printer friendly.  I have managed to complete this for one of my pages perfectly fine by having another style sheet and the referencing this is my master page.</p>
  
  <pre><code>&lt;link href="Styles/style2.css" rel="stylesheet" type="text/css" /&gt;
  &lt;link href="styles/style-print.css" media="print" rel="stylesheet" type="text/css" /&gt;
  </code></pre>
  
  <p>The problem that i have is the main page i wish to have a printer friendly option hold is made up of ASP. Panel controls and these also have 1 or 2 subpanels. I used these panels to reduce clutter and scrolling.  </p>
  
  <p>If i add the relevant div tags to the main page i seem to only get the headers of these Panels and do not get the sub headings or and the content within these panels unless i collapse these panels before i click the printer friendly button.   </p>
  
  <p>This is not a task that i wish the user to complete also the printer friendly page looks horrible as i would like to remove the panel / boxes.   Is there a way for me to format this page so i dont get to see the panels but just the content when the users presses the pinter friendly button?</p>
  
  <p>Regards
  Betty.</p>
  
  <p>Here is some sample code for my collopsible panels...</p>
  
  <pre><code>       &lt;table&gt;
              &lt;tr&gt;
                  &lt;td style="width:528px"&gt;
                      &lt;h5&gt;Topic&lt;/h5&gt;
                  &lt;/td&gt;
                  &lt;td style="width:154px"&gt;
                      &lt;h5&gt;Presenter&lt;/h5&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;h5&gt;Time&lt;/h5&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
          &lt;!--   1.  HSE Issues (Main heading) --&gt;
          &lt;asp:Panel ID="pnlHeaderHSERegIssues" runat="server" CssClass="pnl" 
              Width="740px"&gt;
              &lt;div style="float:left;"&gt;
                  1. Safety, Health, Environmental &amp;amp; Regulatory Issues
              &lt;/div&gt;
              &lt;div style="float:right;"&gt;
                  &lt;asp:Label ID="lblShowHideHSERegIssues" runat="server"&gt;&lt;/asp:Label&gt;
              &lt;/div&gt;
              &lt;div style="clear:both"&gt;
              &lt;/div&gt;
          &lt;/asp:Panel&gt;
          &lt;!--   1.1  Safety Sub heading  --&gt;
          &lt;asp:Panel ID="pnlInfoHSERegIssues" runat="server" CssClass="pnlBody"&gt;
              &lt;asp:Panel ID="pnlHeaderSafety" runat="server" CssClass="pnlBody2" Width="740px"&gt;
                  &lt;div style="float:left;"&gt;
                      1.1 - Safety Reviews
                  &lt;/div&gt;
                  &lt;div style="float:right;"&gt;
                      &lt;asp:Label ID="lblShowHideSafety" runat="server"&gt;&lt;/asp:Label&gt;
                  &lt;/div&gt;
                  &lt;div style="clear:both"&gt;
                  &lt;/div&gt;
              &lt;/asp:Panel&gt;
              &lt;asp:Panel ID="pnlInfoSafety" runat="server" CssClass="pnlBody"&gt;
                  &lt;table width="100%"&gt;
                      &lt;tr&gt;
                          &lt;td style="width: 510px"&gt;
                              &lt;asp:TextBox ID="txtSafety" runat="server" Height="100px" 
                                  style="font-family:Verdana" TextMode="MultiLine" Width="510px"&gt;&lt;/asp:TextBox&gt;
                          &lt;/td&gt;
                          &lt;td style="width: 140px" valign="top"&gt;
                              &lt;asp:TextBox ID="txtSafetyPresenter" runat="server" Height="97px" 
                                  style="font-family:Verdana" width="140px"&gt;&lt;/asp:TextBox&gt;
                          &lt;/td&gt;
                          &lt;td style="width: 57px" valign="top"&gt;
                              &lt;asp:TextBox ID="txtSafetyTime" runat="server" style="font-family:Verdana" 
                                  width="50px"&gt;&lt;/asp:TextBox&gt;
                          &lt;/td&gt;
                      &lt;/tr&gt;
                  &lt;/table&gt;
              &lt;/asp:Panel&gt;
            &lt;/asp:Panel&gt;
  
          &lt;!-- Collapse / un-collapse Panels (Main Heading) --&gt;
          &lt;asp:CollapsiblePanelExtender ID="CollapsiblePanelExtender" runat="server" 
              CollapseControlID="pnlHeaderHSERegIssues" Collapsed="true" 
              CollapsedText="Show Details" ExpandControlID="pnlHeaderHSERegIssues" 
              ExpandDirection="Vertical" ExpandedText="Hide Details" ScrollContents="false" 
              TargetControlID="pnlInfoHSERegIssues" TextLabelID="lblShowHideHSERegIssues"&gt;
          &lt;/asp:CollapsiblePanelExtender&gt;
          &lt;!-- Collapse / un-collapse Panels (sub Heading) --&gt;
          &lt;asp:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" runat="server" 
              CollapseControlID="pnlHeaderSafety" Collapsed="true" CollapsedText="Show" 
              ExpandControlID="pnlHeaderSafety" ExpandDirection="Vertical" ExpandedText="Hide" 
              ScrollContents="false" TargetControlID="pnlInfoSafety" 
              TextLabelID="lblShowHideSafety"&gt;
         &lt;/asp:CollapsiblePanelExtender&gt;
  </code></pre>