Sorry no subject White space in image control

G

Geoff

I am a bit new to this.
I am loading images up and displaying them so they can be selected next or
previous, II am using the Image control setting its ImageUrl property.
I have no problems unless the image file name has a white space in it, how
do I solve this I have read on the net but cant seem to find it.
If I load the image at design time with white space alls well.
Thanks for any guidence
 
S

Stan

I am a bit new to this.
I am loading images up and displaying them so they can be selected next or
previous, II am using the Image control setting its ImageUrl property.
I have no problems unless the image file name has a white space in it, how
do I solve this I have read on the net but cant seem to find it.
If I load the image at design time with white space alls well.
Thanks for any guidence

Hi

Substitute %20 in place of the space character
e.g "../The picture.jpg" would become "../The%20picture.jpg"

HTH
 
G

Geoff

Maybe it could not find the root folder in IIS.
and maybe the space was not the problem?

Strange though it seemed to work if I renamed the file without a space.

Still given the above file root it works all ways regardless of space or not
in the file name.

Thanks Geoff.
 
G

Geoff

Thanks Stan.
Only sent half the message.
I have not used NET new to it, vb6 & interdev.
Tried your suggestion before posting no joy.
I used ! "~/The directory/The Filename.xxx"

With no problem then regardless of the spaces, strange without it formated
like the above it only displayed files without the spaces.
Thanks Geoff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top