3
Answers

CSS Print StyleSheet Not Working on Webforms

Photo of Hold On

Hold On

7y
248
1
Can someone help me how to use correctly the css for media print? I'm very novice when it comes to html and css, hence, all the styles that I use is inline. I tried to follow what I found on google on how to use the media print but no luck. Below is a snippet of my css media print where it doesn't work.
  1. <style>  
  2.         @media print {  
  3.             .imageLogo {  
  4.                 margin-top: 5px;  
  5.             }  
  6.   
  7.             .fontfamily {  
  8.                 font-family: 'Phetsarath OT';  
  9.                 text-align: center;  
  10.                 font-weight: bold;  
  11.             }  
  12.   
  13.             .regularfont {  
  14.                 text-align: center;  
  15.                 font-weight: bold;  
  16.             }  
  17.   
  18.             .sched {  
  19.                 text-align: center;  
  20.                 font-weight: bolder;  
  21.                 font-family: 'Phetsarath OT','Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;  
  22.                 font-size: 35px;  
  23.             }  
  24.   
  25.             .leftSide {  
  26.                 width: 200px;  
  27.             }  
  28.   
  29.             .next-to-left {  
  30.                 width: 300px;  
  31.             }  
  32.   
  33.             .grid {  
  34.                 margin-left: 200px;  
  35.             }  
  36.   
  37.             .gridview td {  
  38.                 width: 300px;  
  39.                 text-align: center;  
  40.             }  
  41.         }  
  42.     </style>  
 Thanks in advance for any help.

Answers (3)

0
Photo of zxcoder
NA 112 0 14y

When users are on your website , they will want to go to different web pages within the site.
You can redirect them using a Response.redirect("url of new page") method
Response.redirect("url of new page") is called to instruct the web browser to request a different web page by posting back to the original page . Your server side code will then process the postback and then process the Redirect, essentially taking the user to the new page they requested
Server.Transfer("url of new page") terminates execution of the current page and starts executing a new page whose URL is specified as the method parameter.
Differences
The PreviousPage property is not accesible when navigating using the Response.Redirect() whereas its available when using Server.Transfer();
Starting a page using Server.Transfer() does not verify that the current user is authorised to see the page that will be executed whereas the redirect method forces reauthorization to take place.
Server.Tranfer() will generally get to the new page faster than Response.Redirect()
0
Photo of yogesh jadon
NA 63 0 14y

response.redirect:
2 round trip,change url,go to any website
server.transfer:
1 round trip,url not change,go to only one domain(IIS) website
0
Photo of Abhimanyu K Vatsa
NA 50.9k 12.4m 14y
take a look here

http://haacked.com/archive/2004/10/06/responseredirectverseservertransfer.aspx
0
Photo of Dipa Ahuja
NA 4.1k 612.7k 14y