Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Old 05-31-2006, 07:05 AM Printing a page
Skilled Talker

Posts: 95
Trades: 0
I know ASP is server side so i'm not sure if it can be done.

Is it possible to have a button that when pressed prints a page to the defult print on the clients PC.
higginbt is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-31-2006, 07:25 AM Re: Printing a page
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
No, it will have to be client side (as with your post in the JS forum)
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-31-2006, 09:31 AM Re: Printing a page
Skilled Talker

Posts: 95
Trades: 0
Yes i know i posted in the java script forum, too but if there was a way to to it via asp then no one in a java script forum would tell me that would they?
higginbt is offline
Reply With Quote
View Public Profile
 
Old 06-01-2006, 02:36 AM Re: Printing a page
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
He's got a point there...sort of.

higginbt: it's not possible to access the printer directly via ASP.

However, it is possible to execute VBS and BAT files from ASP using the Windows Scripting Shell dealy. I haven't played with it very much myself, so I don't know if your thing might work, but it's worth a shot, right?

<%

Dim objWShell
Set objWShell = CreateObject("WScript.Shell")
objWShell.CurrentDirectory = "(current dir)"
objWShell.Run("(some batch or VBS file)")

%>
This does require certain server permissions as well, so you should make sure you have those before you get started.

Hope this helps.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 06-01-2006, 05:31 AM Re: Printing a page
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
Quote:
on the clients PC.
Not in ASP. The code above will execute on the server so there's no way it's gonna print to the client.
Hang in there on the JavaScript forum, or check out GMail. They have a print button that opens a new window and then brings up the default print dialog.
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 06-01-2006, 01:18 PM Re: Printing a page
Skilled Talker

Posts: 95
Trades: 0
Thanks guys for you help on this.
higginbt is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Printing a page
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.22957 seconds with 12 queries