You want to get a reference to your Image control. Something like...
Image img = (Image) e.Item.FindControl("imgWebStatus");
img.ImageUrl = ... your picture url here ...;
--
Eric Cherng
MCP, MCDBA, MCSD
http://echerng.com
"David A. Coursey" <> wrote in message
news:%...
>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.WebControl s.ListItemType.Item) ||
> e.Item.ItemType.Equals(System.Web.UI.WebControls.L istItemType.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
>
>
>
>