I have a gridview that displays user ratings as 'stars' from a jpg
file. The template field is defined as
<asp:TemplateField HeaderText="User Rating">
<ItemTemplate>
<img src='<%# ProductRatingURL(Container.dataitem)
%>' />
</ItemTemplate>
</asp:TemplateField>
The list of records to display is based upon what the user enters in
the criteria fields of the page. I then dynamically change the values
of the sql data source parameters and then rebind the data source and
the grid view.
The first time I run the page the function ProdRatingURL is called and
all the rows have the proper jpg corresponding to the avg user rating.
However, if I enter other search criteria and press the submit button a
second time, the correct records are displayed on the gridview but the
template column is blank because the ProductRatingURL function is not
called.
I can't figure out why the function does not get called since the
gridview has been refresh. The only thing I could think of was that
something gets catched and the function does not get called but why
does no image show up in this column.
Thanks
Russ