473,385 Members | 1,838 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,385 software developers and data experts.

Linking to file with spaces XP %2520 mess up.....

Hi i've created a simple website which allows our intranet users to add
files from shared drives on the domain and structure them on web pages.
(bit like sharepoint). These files are then displayed in a treeview
control as links to the file.

Anyway my problem is very annoying. What I've learned so far. As we
know Microsoft struggled to get IE encoded spaces correctly so they
decided to double encode to get this working.

eg)

file:///K:\Department Data\Sales\My file.doc

was converted to:-

file:///K:\Department%2520Data\Sales\My%2520File.doc

and not the normal

file:///K:\Department%20Data\Sales\My%20File.doc

This works great on all machine on our domain but the new XP
professionals sp2s (Haven't got any sp1s so can't test these). All
users are on IE6(doesn't work on ie7 with xp either), so it isn't this.
What is annoying me the most is that if you remove the 25 from %2520,
back to being a 'space' . This works on all machines or if you remove
it all and just put a space in your browser this works too.

Unfortunatly it is not possible or practical to change the names of the
directorys or files to remove the spaces, as these coule be excel
files, which probably have tons of links too.

I would appreciate any advice, as I have been searching msdn or
newsgroups for 4 hours to no avail. If you think this could be posted
anywhere else, let me know.

Thanks in advance

Greg

May 26 '06 #1
2 3547
I've done a similar thing, I replaced the spaces in the file names with
underscores and when displaying the file name I changed the undercores to
spaces. Any HREFs to the file use the underscore.

--
#####-----#####-----#####
POV Tips and Hints at ...
http://povman.blogspot.com/
May 26 '06 #2
Workaround. Unfortunatly couldn't change any of the filenames, so
changed the the links to post back to the server and redirect to
another page using the value of the nodes in the treeview.
(SelectedNodeChanged)

Only way I can think of. This works on all Os's I've tried.
Dim mylink As String = "file:\\" & sender.selectedvalue()
response.redirect(mylink)
You should be able to use this in a seperate window, but it isn't quite
working. I don't need it in another window as yet, so not too fussed
Dim myscript As String = "<script " &
"language='javascript'>window.open('" & mylink & "');</script>"
Page.ClientScript.RegisterStartupScript(GetType(St ring), "Showfile",
myscript)

Thanks

Greg

May 30 '06 #3

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

Similar topics

1
by: md | last post by:
Hi everybody - I am writing an application to change the target and start in folder in shortcuts. I am using Mattias Sjögren's ShellLink library (thanks!) but I found a problem I was hoping...
7
by: Steven T. Hatton | last post by:
Is there anything that gives a good description of how source code is converted into a translation unit, then object code, and then linked. I'm particularly interested in understanding why putting...
2
by: Matthew Wells | last post by:
Good morning... I have an Access front end that uses SQL Server linked tables. SQL Server uses Windows authentication. I have one Windows group that all Access users are a member of. I added...
1
by: Daveyk0 | last post by:
Hello there, I have a front end database that I have recently made very many changes to to allow off-line use. I keep copies of the databases on my hard drive and link to them rather than the...
8
by: a2x | last post by:
Hi, I am writing a C program which interfaces with a C++ library. The C++ library works fine with C. I was wondering if I need to use a C++ compiler (g++ in my case) to compile the C program or...
18
by: Jen | last post by:
I'm using Microsoft's own VB.NET FTP Example: http://support.microsoft.com/default.aspx?scid=kb;en-us;832679 I can get the program to create directories, change directories, etc., but I can't...
3
by: localpricemaps | last post by:
i am having a problem writing a tuple to a text file. my code is below. what i end up getting is a text file that looks like this burger, 7up burger, 7up burger, 7up and this is instead...
4
by: Vlad | last post by:
I am having problems using the file.create method within a function that is called when looping through an array of filepaths. If I call my function with a hardcoded file path --C:\Temp.txt the...
3
by: sophia | last post by:
Dear all, the following is the file compression program ,using elimination of spaces, which I saw in a book #include<stdio.h> #include<stdlib.h> int main(int argc,char * argv) {
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.