David C
asked on
Gridview Template field not displaying image
Hi guys I have a gridview as below with a template field that displays an image based on the URL in the database. The database column is called pl.
The problem is if the URL is something like folder/folder/default.jpg it does not display it but if its folder/jpg it displays it??
The problem is if the URL is something like folder/folder/default.jpg it does not display it but if its folder/jpg it displays it??
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
BorderColor="White" CssClass="mGrid" ShowHeader="False" BorderStyle="None">
<Columns>
<asp:BoundField DataField="fullname"/>
<asp:BoundField DataField="fteam"/>
<asp:BoundField DataField="city"/>
<asp:TemplateField HeaderText="Picture ">
<ItemTemplate>
<asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("pl") %>' />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<AlternatingRowStyle CssClass="alt" />
</asp:GridView>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
@rashmi my original code is based on that. Thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you all it was my mistake the folder was thumbnails/DF5B8AA15DD8259 F8912E3583 8310AF49E4 A23AB and this was stored in an nvarchar(50) field that was automatically truncating the first bit!
ASKER