Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > proper way to encode URL for image control

Reply
Thread Tools

proper way to encode URL for image control

 
 
JerryK
Guest
Posts: n/a
 
      11-23-2004
HI,

I have a page with an image control and I am trying to set the source to the
image file name "/images/products/image #45-7 picture.jpg" I have tried
setting the name directly and with URLEncode. In both cases, the image
cannot be found. What am I doing wrong?

Thanks,

jerry


 
Reply With Quote
 
 
 
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      11-23-2004
I suspect the # in the name is going to give you trouble. Try escaping
with HTMLEncode or replacing it with a letter or number.

"JerryK" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> HI,
>
> I have a page with an image control and I am trying to set the source to
> the image file name "/images/products/image #45-7 picture.jpg" I have
> tried setting the name directly and with URLEncode. In both cases, the
> image cannot be found. What am I doing wrong?
>
> Thanks,
>
> jerry
>
>


 
Reply With Quote
 
 
 
 
JerryK
Guest
Posts: n/a
 
      11-23-2004
Unfortunately changing the name is not an option. The name is also stored
in a database that we reference, but cannot alter.

"Ken Cox [Microsoft MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I suspect the # in the name is going to give you trouble. Try escaping
> with HTMLEncode or replacing it with a letter or number.
>
> "JerryK" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> HI,
>>
>> I have a page with an image control and I am trying to set the source to
>> the image file name "/images/products/image #45-7 picture.jpg" I have
>> tried setting the name directly and with URLEncode. In both cases, the
>> image cannot be found. What am I doing wrong?
>>
>> Thanks,
>>
>> jerry
>>
>>

>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Proper way to allow Control-C to interrupt IO#gets Lloyd Zusman Ruby 1 02-12-2008 04:47 PM
Proper way to use LIKE operator with SqlDataSource and control parameters in declarative markup? ASP .Net 2 08-18-2007 02:07 AM
Url-encode in DataList sjurmr@online.no ASP .Net 2 12-21-2005 07:38 AM
Help with URL.Encode Gustavo Venturo ASP .Net 1 09-14-2004 10:09 PM
Problem with URL encode serialized object Francois Gagnon Java 1 03-02-2004 02:07 PM



Advertisments