473,383 Members | 1,855 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.

HtmlDecode 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?

Thanks for the help!

Sep 28 '06 #1
1 2086
That is because the Image control encodes the url correctly. An url may
not contain spaces, so they should be encoded as %20.

If you want to produce an image tag with an incorrectly encoded url, you
have to write the html code yourself.

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?

Thanks for the help!
Sep 28 '06 #2

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

Similar topics

1
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
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
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
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"...
4
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
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'...
0
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:...
3
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
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 />?
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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
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: 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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.