mitdaniels
asked on
GridView hyperlink image done another way?
Is there a another way of adding a hyperlinked image to a GridView:
<asp:GridView runat="server" AutoGenerateColumns="False ">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:HyperLink NavigateUrl='<%# Eval("HttpUri")%>' runat="server">
<asp:image imageurl='<%# Eval("ImageUri")%>' runat="server" />
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:GridView runat="server" AutoGenerateColumns="False
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:HyperLink NavigateUrl='<%# Eval("HttpUri")%>' runat="server">
<asp:image imageurl='<%# Eval("ImageUri")%>' runat="server" />
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</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.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I tried without the template field, but cannot get the image to display when it loads, instead it provides a link to the image. How do I get the image to display as soon as the control is loaded?
<asp:HyperLinkField DataNavigateUrlFields="Ima geUri" DataTextField="LabName" NavigateUrl="HttpUri" />
<asp:HyperLinkField DataNavigateUrlFields="Ima
ASKER
Thanks
ASKER