fmardani
Programmer
- Jul 24, 2003
- 152
Hi,
In a datagrid on the web form using C#, I would like to have a column which retrieves a picture based on the GetImage function that I have created and then I would like this to be a hyperlink so that when you click it it uses the value of the first column.
This is what I have using itemtemplate. It retrieves the image but I do not know how to make this image into a hyperlink.
Thanks
<asp:TemplateColumn HeaderText="US">
<ItemTemplate>
<asp:Image Runat="server" ImageUrl='<%# GetImage(DataBinder.Eval(Container,"DataItem.Status").ToString()) %>'></asp:Image>
</ItemTemplate>
</asp:TemplateColumn>
In a datagrid on the web form using C#, I would like to have a column which retrieves a picture based on the GetImage function that I have created and then I would like this to be a hyperlink so that when you click it it uses the value of the first column.
This is what I have using itemtemplate. It retrieves the image but I do not know how to make this image into a hyperlink.
Thanks
<asp:TemplateColumn HeaderText="US">
<ItemTemplate>
<asp:Image Runat="server" ImageUrl='<%# GetImage(DataBinder.Eval(Container,"DataItem.Status").ToString()) %>'></asp:Image>
</ItemTemplate>
</asp:TemplateColumn>