I know how you can set an tag's url attribute programmatically in c#, but it seems when I try to access the image element inside of a tag I cannot access it.
The is residing in the <AlternatingItemTemplate>.
NOTE: I am only having this issue inside the <AlternatingItemTemplate>
Now the ListView tag is also databound.(this is probably why I cannot access, because it isn't guaranteed that it will even exist perhaps).
How can I get around this so that I can display my images programmatically or is there a better solution?
Here's the source:
<asp:ListView ID="ListView_Comments" runat="server"
DataKeyNames="ReviewID,ProductID,Rating" DataSourceID="EDS_CommentsList">
<ItemTemplate>
<tr style="background-color:#EDECB3;color: #000000;"> <td><%# Eval("CustomerName") %></td>
<td> <img src='Styles/Images/ReviewRating_d<%# Eval("Rating") %>.gif' alt="">
<br />
</td>
<td> <%# Eval("Comments") %>
</td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr style="background-color:#F8F8F8;"> <td><%# Eval("CustomerName") %></td>
<td>
<img id="rateImage" src="" alt="" runat="server" />
......