Solved

getting server side files from the client end ?

Posted on 2001-06-29
9
205 Views
Last Modified: 2006-11-17
hi all,
i want to retrieve a server side file (text file) from the client end. the "download file dialog (with the option for save this file to disk and run thsi program from its current location)" should not appear and the file should be directed into the printer

thanks in advance,
manodeep
0
Comment
Question by:manodeep
[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
  • 2
  • 2
  • +2
9 Comments
 
LVL 1

Expert Comment

by:ksenthilraj
ID: 6237049
hai,

Put the file in the server as .doc so that when you are opening that it will opened as a word document..

With Cheers
0
 
LVL 20

Expert Comment

by:Silvers5
ID: 6237214
.. you can't do all this.. wither display the file content in the html body and use window.print() on the onload event of the body tag.. or flush the document using an ado stream and let the client print it..

<%
  Set objStream = Server.CreateObject("ADODB.Stream")
  'open the file
 objStream.Type = adTypeBinary
 objStream.Open
 objStream.LoadFromFile "C:\Inetpub\wwwroot\docs\file.doc"
  'send to the client
 Response.ContentType = "application/vnd.ms-word"
Response.BinaryWrite objStream.Read
 objStream.Close : Set objStream = Nothing
%>

0
 
LVL 4

Accepted Solution

by:
epeele earned 100 total points
ID: 6237891
If you are developing a Web-based application for your local intranet, and you want complete control
over the output that your user prints from your Web application, you could just allow the user to click
the print button on their Web browser.

But you ask, "Isn't there a way I can do this from the server?" The answer is YES: print from ASP.

The full details are at MS:

Using ASP and WSH to Print on Your Intranet
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnserv/html/server033099.asp
0
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!

 
LVL 20

Expert Comment

by:Silvers5
ID: 6238011
This is an INtranet solution.. not an internet one.. it's narrowed
0
 
LVL 4

Expert Comment

by:epeele
ID: 6238023
That's what I said in line 1:

>> If you are developing a Web-based application for your local intranet

But thanks for highlighting it again, Silvers5, for those who may have skimmed over it the first time.
0
 

Author Comment

by:manodeep
ID: 6238219
hey epeele ,
thanks. i think your solution will work
i have not implemented the code yet
will let you know

manodeep
0
 
LVL 4

Expert Comment

by:epeele
ID: 6238224
You're welcome manodeep! :)
0
 

Author Comment

by:manodeep
ID: 6238253
hi silvers,
i tried out your solution but ended up displaying the contents in the web browser :(
thanks anyway

manodeep
0
 
LVL 14

Expert Comment

by:puranik_p
ID: 9128379

        No comment has been added lately, so it's time to clean up this TA.
        I will leave a recommendation in the Cleanup topic area that this question is:

->    Accept epeele's comment as answer

         Please leave any comments here within the next seven days.
         
        PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
         
        puranik_p
         EE Cleanup Volunteer  

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with query 3 42
Index on a Table 6 37
Reg Exp to extract Url from string asp 12 58
Can't select treeview node from iframe 2 54
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

738 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