Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

asp:calendar and window.print();

Posted on 2006-11-09
7
Medium Priority
?
493 Views
Last Modified: 2013-12-03
I have a strange bug, I have a page with a asp:calendar control, I do plenty of
e.Cell.BackColor = System.Drawing.Color.Orange
to put colors in the days of the calendar, I end up with a pretty colorfull calendar. Then I do a window.print(); with javascript and it prints blank calendars... all the colors dissapear on the printing, I simply don't understand the reason of this behavior but I need to print that calendar.

Help please ?
0
Comment
Question by:Drakecoldwinter
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 16

Accepted Solution

by:
muzzy2003 earned 1400 total points
ID: 17909701
This is down to the printing in the browser. In IE, there is an option under Printing in the advanced options to enable background colour printing, but it's off by default.
0
 
LVL 2

Author Comment

by:Drakecoldwinter
ID: 17909825
Well, I got an easy and concrete answer that works well, so I will consider myself kind of happy with it. Now I have the whole background also printing wich I don't truly wish, but at the very least the calendars print, so I give you the points. thanks
0
 
LVL 16

Expert Comment

by:muzzy2003
ID: 17909841
Sorry the answer wasn't closer to what you wanted, but glad to help.
0
Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

 
LVL 2

Author Comment

by:Drakecoldwinter
ID: 17909869
Well I wished to print the calendars with all the colors, now it works. The background is heavy and deranges the print through, but I found something about CSS @media print that I can use to maybe take off the background. At the very least now it's functional and I can print those calendars, so is just a look matter for the background. But your answer was 100% acurate.
0
 
LVL 2

Author Comment

by:Drakecoldwinter
ID: 17909910
I'm a happy man now, for further reference this has solved all my troubles and print a beautifull page with colorfull calendars and no background, thanks muzzy2003 :

@media print {
            BODY {background-color : White ;}            
             }
 @media screen{
      BODY {
      background-color : #003366;
      background-image : url(images/backgnd2.jpg);
      background-repeat : repeat-x ;
}}
0
 
LVL 16

Expert Comment

by:muzzy2003
ID: 17909931
Excellent. And I've learned something too. That's why I'm here, really!
0
 

Expert Comment

by:sheldondbrown
ID: 38554187
Hi all,

I'm running into the same issue that Drakecoldwinter was having, but enabling Print background colors and images isn't fixing the issue.  Given that this thread is from 2006, I was wondering if different settings needed to be tweaked using IE 8?  If anyone has any ideas they would be greatly appreciated.  Thanks so much.

EDIT:
Just in case someone comes along with a simlar problem.  In IE 8, there is another setting that needs to be checked.  See this kb article for details:

http://support.microsoft.com/kb/974128
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question