Posts

Showing posts from September 17, 2013

How to Hide Buttons On Hardcopy of Printed Page and also Hide URL and Date

Image
To hide URL and date in hard copy of printed page you should do some setting in your browsers as it's setting changes according to various browsers. First look at Firefox so do it according to this. Go > Page setup > Select Margin & Header footer and make all field blank according to your requirment. In Chrome after giving print command do following If you want to hide buttons on printed page then in you javascript code you should hide all buttons after giving print command so do it as  <script type= "text/javascript" >         function printpage() {              var a = document.getElementById( "Button1" );             var b = document.getElementById( "Button2" );             a.style.visibility = 'hidden' ;             b.style.visibility = 'hidden' ;             window.print()         } </script> And in your button give command like this.. < asp:Button class=" button " ID=" Butt

Pass Value From One Web Page To Another in Asp.Net

Image
Suppose there is a scenario in which you want when you click on some text then associated value should pass to another page and with the help of this associated value you can do anything. That link my be simply in paragraph or in Grid View or in Data list. There may be many methods to do it and I hope one of them called 'Session' be in you knowledge. But doing this with help of session is not considered good so here we will use other technique as well.. Suppose you have Page 'a.aspx' and other page 'b.aspx' you want to pass value from one to another then on first page write this code but before this suppose you have a link button on click of this associated value will pass to 'b.aspx'. code on click event of link button in 'a.aspx' Response.Redirect(" b.aspx?value= " + here you should write variable of reference variable); Response.Redirect(" b.aspx "); on the page 'b.aspx' of page load event write following c