473,509 Members | 2,528 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HtmlEncode in <asp:image>

MRW
Hello!

I'm taking a file name from a database and using the <asp:imagetag in
GridView to show the image. However, some of the file names have
spaces in it and no matter what I do, for example:

<asp:Image runat=server ImageUrl=<%#
HttpUtility.HtmlDecode((Eval("WallpaperLink"))) %/>

It still displays the file as: bobs%20image. %20 keeps popping up.
Does anybody have any solutions? Oh yes, I've also tried
URLDecode/Encode

Thanks for the help!

Sep 30 '06 #1
3 2202
I answered this in some other newsgroup where you also posted it. Use
crossposting instead of posting separate copies.

MRW wrote:
Hello!

I'm taking a file name from a database and using the <asp:imagetag in
GridView to show the image. However, some of the file names have
spaces in it and no matter what I do, for example:

<asp:Image runat=server ImageUrl=<%#
HttpUtility.HtmlDecode((Eval("WallpaperLink"))) %/>

It still displays the file as: bobs%20image. %20 keeps popping up.
Does anybody have any solutions? Oh yes, I've also tried
URLDecode/Encode

Thanks for the help!
Sep 30 '06 #2
MRW
I'll be honest... this is the only newsgroup I posted to...

Göran Andersson wrote:
I answered this in some other newsgroup where you also posted it. Use
crossposting instead of posting separate copies.

MRW wrote:
Hello!

I'm taking a file name from a database and using the <asp:imagetag in
GridView to show the image. However, some of the file names have
spaces in it and no matter what I do, for example:

<asp:Image runat=server ImageUrl=<%#
HttpUtility.HtmlDecode((Eval("WallpaperLink"))) %/>

It still displays the file as: bobs%20image. %20 keeps popping up.
Does anybody have any solutions? Oh yes, I've also tried
URLDecode/Encode

Thanks for the help!
Sep 30 '06 #3
MRW
My apologies... when I originally posted my question, I did not see it
posted. Thinking an error occured, I tried again. I now see that it
DID post correctly....

Göran Andersson wrote:
I answered this in some other newsgroup where you also posted it. Use
crossposting instead of posting separate copies.

MRW wrote:
Hello!

I'm taking a file name from a database and using the <asp:imagetag in
GridView to show the image. However, some of the file names have
spaces in it and no matter what I do, for example:

<asp:Image runat=server ImageUrl=<%#
HttpUtility.HtmlDecode((Eval("WallpaperLink"))) %/>

It still displays the file as: bobs%20image. %20 keeps popping up.
Does anybody have any solutions? Oh yes, I've also tried
URLDecode/Encode

Thanks for the help!
Sep 30 '06 #4

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

Similar topics

1
4185
by: Chris Fink | last post by:
Hello, Does anyone know of a way to handle broken href image tags either by using the html img tag or the asp:image server control? For example, if my src attribute is broken, I would like to...
13
7411
by: tperri | last post by:
I have an HTML table with several fields like this: <A href="Savings.aspx?category=Food"><asp:imagebutton id="imgFood" ImageUrl="images\buttons\btn-food-i.gif"...
0
1096
by: DavidS | last post by:
I have HTML web page with <asp:Image id=img_L runat=server ImageAlign=Top Visible=True Width=y Height=x></asp:Image>. For some images, less than 128K I can view image. Other image files > 128K,...
4
2203
by: Satya | last post by:
Hi all, The following code is throwing a run time error "The server tag is not well formed. " <ItemTemplate> <asp:HyperLink Runat="server" ID="lnkFile"...
11
7712
by: Joe | last post by:
Hello All, I have an ASP.NET page with one Textbox (SearchTextBox) and one ImageButton (SearchButton) server controls. The user can type search text in SearchTextBox and click SearchButton and...
4
1728
by: R.A.M. | last post by:
Hello, Could anyone help me to handle <asp:Image> click in behind code? I have: <asp:Image ID="DotNETImage" ImageUrl="Images/DotNET_360x280.jpeg" AlternateText="Microsoft .NET version 2.0"...
3
21241
by: jackiepatti | last post by:
QUESTION: I have a web page containing a form that contains an image instead of a submit button, e.g. <form name='myform' action='get' method='otherpage.asp'> <input type='image'...
1
2103
by: MRW | last post by:
Hello! I'm taking a file name from a database and using the <asp:imagetag in GridView to show the image. However, some of the file names have spaces in it and no matter what I do, for example:...
2
2036
Steve Kiss
by: Steve Kiss | last post by:
Is there a way to add javascript functionality, onmouseover to be specific, to an image defined with <asp:Image />?
0
7342
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7410
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...
1
7067
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5060
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3215
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3201
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
774
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.