locked
SQL Database image not displaying RRS feed

  • Question

  • I am display records from a database in grid view, which contains an image. Initially I had this set up to retrieve data from an Access database and it worked fine.

    I am now converting to using SQLdatasource, and when I do the images no longer display. On checking the image properties when the page is displayed through internet explorer the file name is TF444.jpg%20 , ie  the characters have %20 have been added to the file name.

     

    the code is as follows

    <asp:imagefield DataImageUrlField="Photo1" DataImageUrlFormatString="images/{0}" HeaderText="Photo">
                            <ControlStyle Height="100px" Width="133px" />
                            <HeaderStyle Font-Names="Arial" BackColor= "#ff5e0d" />
                        </asp:imagefield>

    How do I get rid of the %20 characters.

     

    Many thanks

    Sunday, May 22, 2011 12:01 PM

Answers

  • %20 means that the file name has a space in it. Is there a blank space after .jpg ?

     


    Expression Web MVP
    • Marked as answer by Andrew369 Sunday, May 22, 2011 2:30 PM
    Sunday, May 22, 2011 1:50 PM

All replies

  • %20 means that the file name has a space in it. Is there a blank space after .jpg ?

     


    Expression Web MVP
    • Marked as answer by Andrew369 Sunday, May 22, 2011 2:30 PM
    Sunday, May 22, 2011 1:50 PM
  • Many thanks. Sometimes you spend so long looking for the complicated solutio you miss the obvious.
    Sunday, May 22, 2011 2:30 PM