Re: Implementing print functionality in ASP.NET web application
- From: "Mark Fitzpatrick" <markfitz@xxxxxxxxxx>
- Date: Sun, 22 Oct 2006 15:11:23 -0500
Vera,
No object or class will do it. The Print Post button I believe
you're seeing (I don't see it as I'm accessing the group through a
newsreader directly and not a web interface) will only use a JavaScript on
the client to invoke the print dialog. There's not much else that is or can
be done as you can't create server-side print code because that won't affect
the browser, and the browser is designed to prevent any malicious code from
running features of the OS.
Run a search over at www.dynamicdrive.com for some JavaScript print
functions. There are a few, but all they can really do is invoke the print
dialog. There's one implementation at:
http://www.dynamicdrive.com/dynamicindex9/other1.htm A little more complex
than some, but supposedly cross-browser compatible.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"Vera" <Vera@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F2CAFE1D-764F-4D19-A5F7-5AA49D967392@xxxxxxxxxxxxxxxx
I tried the ShowPrintButton property. Even if I set it to true, the button
doesn't show.
There must be some way to get some printing done from a web page. Even
this
page from which I entered my question has a button saying 'Print Post'. So
it's obviously not impossible. But how does it work? What objects and/or
classes do I need and how do I use them? And you say something about CSS.
How
do I use that? Do you have an example?
Vera
"Mark Fitzpatrick" wrote:
Vera,
There's a ShowPrintButton property that can be set to true/false.
Now, because it's a web app, you really don't have the same control over
printing that you would with a desktop app. HTML and Javascritp only
enable
so much with printing as the basic design of a web browser precludes this
kind of access (security hazard and all). You could control certain
aspects
using CSS as most modern browsers support the ability to define a special
print set of styles that define the appearance of the document when it's
printed out, but doesn't show it when it's being viewed in the browser.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"Vera" <Vera@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:35494472-405F-4EB5-ABE8-C783DF6BB85F@xxxxxxxxxxxxxxxx
Hi there!
I'm a total newbie at web development, so I started bydownloading and
installing Visual Web Developer 2005 Express Edition as well as SQL
Server
2005 Express Edition. I also downloaded several starterkits and studied
the
MSDN articles on these starterkits. I learned quite a lot from them and
got
things started nicely. There is one thing that I hoped to find,
however,
but
didn't. That is how to implement printing in my web application. Just
printing the web page itself is one thing, but I'd also like to enable
my
users to print reports, preferably in some sort of company housestyle.
I already looked into the options of the ReportViewer object, which
seem
to
cover what I need for my application. However, when I include the
object
in
my web page, the Print button doesn't show, so for some weird reason
that
doesn't work. Maybe I'm doing something wrong.
Are there any whitepapers or other technical articles that can help me
get
what I want? Or can anyone provide me with an example (ASP.NET/C#) that
I
can
use?
Any help will be greatly appreciated!!
Greetings, Vera
.
- References:
- Re: Implementing print functionality in ASP.NET web application
- From: Mark Fitzpatrick
- Re: Implementing print functionality in ASP.NET web application
- From: Vera
- Re: Implementing print functionality in ASP.NET web application
- Prev by Date: Re: Basic navigation question
- Next by Date: Re: visual studio debugger message
- Previous by thread: Re: Implementing print functionality in ASP.NET web application
- Next by thread: Basic navigation question
- Index(es):