datagrid

G

Guest

Hi!

I am using a datagrid wherein one of the columns should show an image (.gif
file). Every row should show the same image. When the user clicks the image,
certain data from the row is passed to another webform via Response.Redirect(
). How do I place the image in the column and what type of column should I
choose from the property builder of the datagrid? Should I choose the button
or hyperlink column? Thanks in advance.
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

How are you storing the image? if you have it in a file then you should
declare the column as
<asp:templatecolumn>
<itemtemplate>
<asp:ImageButton src=<%#
Container.DataItem("name_of_image.gif")%>></asp:ImageButton>


Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top