D
David A. Coursey
I am trying to change the image in my column depending on the status of the
db field. All of the data is being populated correctly, I just haven't been
able to get the image path to work.
aspx page:
<asp:boundcolumn visible="False" datafield="success" />
<asp:templatecolumn headertext="Status" >
<itemtemplate>
<asp:image id="imgWebStatus" runat="server" imageurl="" />
</itemtemplate>
</asp:templatecolumn>
aspx.cs codebehind page:
if(e.Item.ItemType.Equals(System.Web.UI.WebControls.ListItemType.Item) ||
e.Item.ItemType.Equals(System.Web.UI.WebControls.ListItemType.AlternatingItem))
{
switch(Convert.ToInt32(e.Item.Cells[0].Text))
{
case 0:
{
e.Item.Cells[1].WHAT_GOES_HERE = Request.ApplicationPath +
"/images/no.gif";
break;
}
Thanks for looking.
David A. Coursey
db field. All of the data is being populated correctly, I just haven't been
able to get the image path to work.
aspx page:
<asp:boundcolumn visible="False" datafield="success" />
<asp:templatecolumn headertext="Status" >
<itemtemplate>
<asp:image id="imgWebStatus" runat="server" imageurl="" />
</itemtemplate>
</asp:templatecolumn>
aspx.cs codebehind page:
if(e.Item.ItemType.Equals(System.Web.UI.WebControls.ListItemType.Item) ||
e.Item.ItemType.Equals(System.Web.UI.WebControls.ListItemType.AlternatingItem))
{
switch(Convert.ToInt32(e.Item.Cells[0].Text))
{
case 0:
{
e.Item.Cells[1].WHAT_GOES_HERE = Request.ApplicationPath +
"/images/no.gif";
break;
}
Thanks for looking.
David A. Coursey