473,383 Members | 1,840 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

How to open a file on the clients local hard drive from within ASP

Dear,

I do have an ASP page with vbscript code entirely executed on the IIS
server. The page contains a lot of data coming from the SQL Server.
I want to populate one of the <selectboxes on that page with data coming
from a file stored on the clients local hard drive. How do I achieve this?

Thanks in advance,
Regards,
Peter

Oct 12 '07 #1
7 2245
=?Utf-8?B?UGV0ZXI=?= wrote on 12 okt 2007 in
microsoft.public.inetserver.asp.general:
I do have an ASP page with vbscript code entirely executed on the IIS
server. The page contains a lot of data coming from the SQL Server.
I want to populate one of the <selectboxes on that page with data
coming from a file stored on the clients local hard drive.
How do I achieve this?
You don't.

ASP runs ONLY on the server
and ONLY sends the computed html to the client.

Clientside coding, in javascript,
[or if IE only, also in clientside vbscript]
could read from the client's hard disk
ONLY if the security of the browser is compromized.

This however, besides being unwize,
is outside the scope of this ASP NG.

You could say, as many have done before you,
and you could and should have read in the archive,
that your application is so important, that it
is justfied that asp programmers should help you to
make clientside script, that also is dangerous to the ordinary user
if it were even possible, but I would not agree with you there.

So I would urge you not even to search for appropriate NG's,
but to abandon your quest.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Oct 12 '07 #2
Thanks Jan for the answer.
The goal was to build the drop down list with all 2800 Cities and their
postcode in it so the user can select the city rather then typing it.
Problem is that it takes a huge time to download this content from the server
(SQL data) to the client. It would goes faster if this data was locally
stored since she would not change in the future. (unless the spilt of HBV
will cause Flemish cities become Brussels cities, according to the current
political crisis in Belgium)
"Evertjan." wrote:
=?Utf-8?B?UGV0ZXI=?= wrote on 12 okt 2007 in
microsoft.public.inetserver.asp.general:
I do have an ASP page with vbscript code entirely executed on the IIS
server. The page contains a lot of data coming from the SQL Server.
I want to populate one of the <selectboxes on that page with data
coming from a file stored on the clients local hard drive.
How do I achieve this?

You don't.

ASP runs ONLY on the server
and ONLY sends the computed html to the client.

Clientside coding, in javascript,
[or if IE only, also in clientside vbscript]
could read from the client's hard disk
ONLY if the security of the browser is compromized.

This however, besides being unwize,
is outside the scope of this ASP NG.

You could say, as many have done before you,
and you could and should have read in the archive,
that your application is so important, that it
is justfied that asp programmers should help you to
make clientside script, that also is dangerous to the ordinary user
if it were even possible, but I would not agree with you there.

So I would urge you not even to search for appropriate NG's,
but to abandon your quest.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Oct 12 '07 #3
Hi Peter
Just a thought
Use a "Text" Input box for the PostCode to be typed in
On Lost focus
use XMLHTTP to get the City from your Internet server
that is Fast and the Web Page does not need to be repainted
- the City name appears where-ever you want it in your page.
Pete (Northolt UK)

Peter wrote:
Thanks Jan for the answer.
The goal was to build the drop down list with all 2800 Cities and their
postcode in it so the user can select the city rather then typing it.
Problem is that it takes a huge time to download this content from the server
(SQL data) to the client. It would goes faster if this data was locally
stored since she would not change in the future. (unless the spilt of HBV
will cause Flemish cities become Brussels cities, according to the current
political crisis in Belgium)

"Evertjan." wrote:
=?Utf-8?B?UGV0ZXI=?= wrote on 12 okt 2007 in
microsoft.public.inetserver.asp.general:
I do have an ASP page with vbscript code entirely executed on the IIS
server. The page contains a lot of data coming from the SQL Server.
I want to populate one of the <selectboxes on that page with data
coming from a file stored on the clients local hard drive.
How do I achieve this?
You don't.

ASP runs ONLY on the server
and ONLY sends the computed html to the client.

Clientside coding, in javascript,
[or if IE only, also in clientside vbscript]
could read from the client's hard disk
ONLY if the security of the browser is compromized.

This however, besides being unwize,
is outside the scope of this ASP NG.

You could say, as many have done before you,
and you could and should have read in the archive,
that your application is so important, that it
is justfied that asp programmers should help you to
make clientside script, that also is dangerous to the ordinary user
if it were even possible, but I would not agree with you there.

So I would urge you not even to search for appropriate NG's,
but to abandon your quest.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Oct 13 '07 #4

"Peter" <Pe***@discussions.microsoft.comwrote in message
news:28**********************************@microsof t.com...
Thanks Jan for the answer.
The goal was to build the drop down list with all 2800 Cities and their
postcode in it so the user can select the city rather then typing it.
Problem is that it takes a huge time to download this content from the
server
(SQL data) to the client. It would goes faster if this data was locally
stored since she would not change in the future. (unless the spilt of HBV
will cause Flemish cities become Brussels cities, according to the current
political crisis in Belgium)
To boil the issue down you have a large amount of data that you want to
transfer to the client and store it locally so that its not retrieved every
time the page is hit by that client.

This is what the local browser cache is for.

Place the postcodes and cities in an XML file (lets call it cities.xml)

In IIS manager add a Cache-Control header to the file with the value
"max-age: 900" A 15 minute life time may seem too conservative but its not
since all it really means is how often a round trip resulting in a 304
response is generated.

Now in javascript:-

// A good implementation would do error checking but this'll work
function getXML(url)
{

if (window.XMLHttpRequest)
oXmlHttp = new XMLHttpRequest()
else
oXmlHttp = new ActiveXObject("MSXML2.XMLHTTP.3.0")

oXmlHttp.open "GET", url, false
oXmlHttp.send

return oXmlHttp.ResponseXML

}

If this is the only application you'd have for the XML I would be tempted to
make your XML look like this:-

<select id="cboCity" name="city">
<option value="postcode">City Name</option>
<option value="postcode">City Name</option>
Oct 13 '07 #5
This is the Internet, and it is all about freedom.

"Evertjan." wrote:
[Please do not toppost on usenet]

Oct 15 '07 #6
Gazing into my crystal ball I observed "jp2code" <poojo.com/mail>
writing in news:OP**************@TK2MSFTNGP03.phx.gbl:
"Evertjan." wrote:
>[Please do not toppost on usenet]

This is the Internet, and it is all about freedom.
No, this is Usenet. Please do not top post, otherwise the message looks
like:
No this is Usenet
>This is the Internet
>>Please do not toppost on usenet
Now, does the above make any sense? Got it?

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Oct 15 '07 #7
jp2code wrote on 15 okt 2007 in microsoft.public.inetserver.asp.general:
This is the Internet, and it is all about freedom.

"Evertjan." wrote:
>[Please do not toppost on usenet]
1
So freedom is not allowing me to say "please"?
So freedom is not about asking for adhering to Netiquette?

2
The internet is not about freedom.
Why would you think that?
The internet is just communication technology.
It is like saying, that the beach is all about freedom,
where the beach is just a nicely situated piece of sand.
Yes the internet can give freedom, just like a wire cutter.

So:

[Please do not toppost on usenet]
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Oct 15 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: wj | last post by:
Hi all, I've got some problems uploading files using apache and php on a local Windows PC. I'm using the file upload example from the manual, but i can't get it to work. I don't get an error...
5
by: elieli_132 | last post by:
Hi, My problem is the following: Made changes to code in form and closed the form. Now unable to open / design the form. - Tried copying and pasting - the new one does not open /display....
115
by: TheAd | last post by:
At this moment I use MsAccess and i can build about every databound application i want. Who knows about a serious open source alternative? Because Windows will be a client platform for some time, i...
8
by: Lam | last post by:
HI anyone knows how can I open a mapped network file in C#? I try string file = @"T:\file.txt"; it shows me the error: "Could not find a part of the path" but if I copy the file to my C dirve,...
2
by: robert d via AccessMonster.com | last post by:
I need to determine for sure if a particular fie is on the user's local PC or on the server. I have the complete path of the file, let's call it FullFilePath How can I unequivocally determine...
23
by: wylbur37 | last post by:
I'm running an Apache server on my own computer (Windows XP Pro). I wrote a simple PHP script (called test3.php) that I'm running by putting the following URL in the address bar of the browser...
89
by: Cuthbert | last post by:
After compiling the source code with gcc v.4.1.1, I got a warning message: "/tmp/ccixzSIL.o: In function 'main';ex.c: (.text+0x9a): warning: the 'gets' function is dangerous and should not be...
0
by: Ima Loozer | last post by:
When I try to open a database that on one of my network mapped drives I get the following error=3F "This file is located outside you intranet or on an untrusted site. Microsoft Access will not...
22
by: robertgregson | last post by:
Using C#, .NET3.5, Visual Studio 2008 and WCF on Windows VISTA SP1, I have written a service, service host (as a C# console application) and a client. The service uses...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.