First add a hyperlink field to the gridview and then:
<blockquote class="FQ"><div class="FQA">Quote:</div> if (e.Row.DataItem != null)
{
DataRowView drv = (DataRowView)e.Row.DataItem;
string link_status = drv["link_status"].ToString();
if (link_status == "0")
{
TableCellCollection myCells = e.Row.Cells;
HyperLink planLink = (HyperLink)myCells[0].Controls[0];
planLink.ImageUrl = "~/gifs/red.gif";
}
else if (link_status == "1")
{
TableCellCollection myCells = e.Row.Cells;
HyperLink planLink = (HyperLink)myCells[0].Controls[0];
planLink.ImageUrl = "~/gifs/green.gif";
}
}
else
{ }</blockquote>