control IE Header Footer in code

  • Thread starter Thread starter don schilling
  • Start date Start date
D

don schilling

Is there a way to control the HeaderFooter text of IE from code. Usually IE
has a Header setting of "&w&bPage&pof&P". I would like it to be nothing.
There is a report that needs printing with no header or footer. I'd like
the aspx page to set the header footer to null. I've seen some javascript
examples. Is there a c# aspx way? Telling each user to change the print
layout isnt an option.

Thanks
Don
 
Whatever you do will need to be done on the client, so C# and / or
aspx is out unless you want to install the framework on the client
PC's. To my knowlege, changing these settings is considered a security
breach, so is not allowed. Consider using a report tool (Crystal
Reports?) to generated your report where you have better control over
the printed output.
 
These settings are changable. I can do it successfully with java script.
Crystal is not a consideration. Anyone have an idea of how this can be done
via c# rather than javascipt?

Thanks
 
Can you post an example of code that changes the print characteristics
for head / footer via Javascript. Its not that I dont believe you, but
I have never seen anything that could do it.

In the absence of anything else, I would definitely say that C# is out
since that is entirely a server side language tool with no connection
to the client's browser.
 
There are many who go out their way to help with newsgroup questions when
they go unanswered. By replying to the original post, that opportunity of
help is now lost. Its not that I don't appreciate q&a, but I was looking a
solution or a pointer. Generic opinions are usually better after the thread
has received other responses. Here are some starters on JavaScript. Or do
a web search on "HEADERFOOTER".

http://msdn.microsoft.com/library/d...rintpreview.asp
http://www.webreference.com/js/column89/
http://www.webreference.com/js/column95/
http://www.evolt.org/article/Kissin...2225/index.html
http://www.evolt.org/article/Printi...style/17/26318/
http://www.alistapart.com/stories/goingtoprint/


If anyone has an idea of how to control HEADERFOOTER via c# code behind, let
me know.
TIA
Don
 
Back
Top