window.print In Asp.net (Colors are not shown)

Hi
i have make a simple html Page

i put only labels and i set the colors to them

the problem when i click Print preview or print them from the browser menu
File-->Print
always printed in white and black

i search google and try to change setting in the browser but no luck

Thanks
print.png
LVL 16
Kamal KhaleefaInformation Security SpecialistAsked:
Who is Participating?
 
Kamal KhaleefaInformation Security SpecialistAuthor Commented:
hi
i fix the problem by doing the following

for the style sheet i add media="print" and i make sure no media directive is exist in ths css itself

also i change the setting in browser to print background images
0
 
Luis PérezSoftware Architect in .NetCommented:
I think this is a problem on your printer's settings. Sure it's no ASP.net/VB/javascript problem.
0
 
Jitendra PatilSr.Software EngineerCommented:
is this happening with all browsers, if no then in which browser are you facing problem?

may be your solution lies in
go to page setup of your browser and Select the Print Background Colors and Images check box.
this should do the work.

Hope this helps.
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
Kamal KhaleefaInformation Security SpecialistAuthor Commented:
It happens in all browser
Also i set the option to print background colors and not working
0
 
Luis PérezSoftware Architect in .NetCommented:
Browse your printer settings, there must be an option in which to choose if you want to print in color or just black ink.
0
 
Kamal KhaleefaInformation Security SpecialistAuthor Commented:
i think the problem is from my page because if i open any other websites like yahoo ...etc
and click print it will print everything colored

any help????
0
 
Kamal KhaleefaInformation Security SpecialistAuthor Commented:
you have to set the media directive to print
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.