change an individual image in a gridview depending on a value
i have 2 tables assignment and feedback, in a gridview it displays all the assignments, the assignments then get feedback. im then wanting to change the view feedback button in the gridview depending on if there is new feedback for example:
the feedback table has a sta开发者_StackOverflow中文版te field in it so when its 1 i want that image button to change to the one with the +
Thanks in advance Houlahan
on ItemDataBound Event you can can change image's url
Image img = (Image)e.Item.FindControl("ImgId");
img.NavigateUrl = "~/images/othersource.png";
精彩评论