print page in asp.net without master page's controls
asp.net, printing
Solution
You require to create new style sheet print.css and set CSS media=print
for example :
<style media="screen">
.noPrint{ display: block; }
.yesPrint{ display: block !important; }
</style>
<style media="print">
.noPrint{ display: none; }
.yesPrint{ display: block !important; }
</style>
and add class to "yesPrint" to the sections you want to print
<asp:ContentPlaceHolder class="yesPrint" id="MainContent" runat="server">
</asp:ContentPlaceHolder>
for more detatil : http://www.codeproject.com/KB/HTML/Printing_with_CSS.aspx
Problem
I want to print my page accept the elements of masterpage. there is a user control in masterpage and it is important for me. also my print button is on master page. thanks..