Print Page | Close Window

’M tired, trying to do

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=5258
Printed Date: 30 March 2026 at 7:46pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: ’M tired, trying to do
Posted By: qtechs
Subject: ’M tired, trying to do
Date Posted: 25 August 2003 at 1:48am

Anyone knows how to read contents in local file...

My problem is...

I want my ASP page should enable user to browse his/her local drive(i.e. c:.d:,E: etc) and select a file (may it be a text file) and my asp page then will read the content of that text file and will show same...

I am badly inneed of that...




Replies:
Posted By: Mart
Date Posted: 25 August 2003 at 4:00am

Upload it using a component http://www.dundas.com - www.dundas.com http://www.dimac.net - www.dimac.net are good ones, and use file system object to read the file once its uploaded (you can use fso to delete the file after if neccessary).

Mart.



Posted By: MorningZ
Date Posted: 25 August 2003 at 7:10am

and building on Mart's answer...

realize that ASP runs on the web server and does not have access to a user's HD (could you imagine the hacker mayhem if it did?)

in ASP, the file MUST exist on the same server that the site runs on to have access to it



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: qtechs
Date Posted: 25 August 2003 at 7:48am

Thanks a lot both of you,

Morning I got Mart's Answer and was trying...and now MorningZ has replied in very very wisely...Thanks once again, now I could understand , what a stupid thing I was looking for any way as Mart says I should first upload the file and then can read through it...Its quite comprehensive...but,I might be stupid being not able to implemenmt..., I could not implement that logic...as I was looking for some ready to use script to upload files rather than using such installable files...'COZ in the client machine that has to be installed first and all night not be having the same...

Can I EXPECT A MORE GENERALIZED SOLTn.

Thanks..

 



Posted By: MorningZ
Date Posted: 25 August 2003 at 8:24am

its not impossible to do without first getting to the server... there are lots of (expensive) VBScript ActiveX controls that can do almost anything to files on the client machine....  with these, you'll get that "certificate" popup that you may run across here and there when something tries to install something locally of a web page (Microsoft's download control, Google's Toolbar, etc)....

but i wasn't trying to be "wise", i was just trying to definitively point out that ASP (thankfully) has zero access to client files (except of course cookies)... sorry if you were easily offended or whatever.....



-------------
Contribute to the working anarchy we fondly call the Internet



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net