Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 281777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:13:56+00:00 2026-05-12T05:13:56+00:00

I have this: <img id=imgField alt= runat=server src='<%# string.Format(images/{0}.jpg, DataBinder.Eval(Container.DataItem,Name)) %>’ /> and it’s

  • 0

I have this:

<img id="imgField" alt="" runat="server" src='<%# string.Format("images/{0}.jpg", DataBinder.Eval(Container.DataItem,"Name")) %>' />

and it’s rendering %20’s from the spaces in the databound Name. So I need to replace all of the “%20’s” with “”

I tried

<img id="imgField" alt="" runat="server" src='<%# string.Format("images/{0}.jpg", DataBinder.Eval(Container.DataItem,"Name")).Replace("%20","") %>' />

and that didn’t work… Anyone know?

Thanks,
Matt

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T05:13:56+00:00Added an answer on May 12, 2026 at 5:13 am

    The %20 values are probably a result of the control parsing the attribute. If you want to eliminate spaces try .Replace(” “, “”)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have this: <img ID=imgField runat=server ImageUrl='<%# DataBinder.Eval(Container.DataItem,Name) %>' /> How can I
Suppose I have this image: <img src=images/01.jpg border=0 rel=shadow /> Then with jQuery, I
At my webpage I have links to images like this: img/123456765/mypicture.jpg (<img src=img/123456765/mypicture.jpg />)
I have this id in my html code: <div id=me> <img src=Me.JPG alt=Me width=450
I have this HTML structure <img width=25 height=25 src=/data/apple_logo.jpg alt=Chocolate /> <input class=cake_checkboxes style=vertical-align:
I have this code: HTML: <img class=d src=i3.jpg alt=/><img class=d src=i4.jpg alt=/> CSS: img.d{margin-top:10px;margin-left:20px;}
I have this markup for the background image: <img src=bg.jpg id=bg alt=> and this
I have this string: small: http://img.exent.com/free/frg/products/666550/player_boxshot.jpg boxshot: http://img.exent.com/free/frg/products/666550/boxshot.jpg I want to get only the
I have this code: <header> <div id=title> <img alt=logo src=/Content/logo.gif /> </div> <nav> <ul
I have this HTML code multiple times one after the other: <li> <img src=path/to/my/picture.jpg

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.