M
M_at
I'm using a repeater with some conditional code - one of the things I
need to do is display the first X items slightly differently. To enable
this I have a public integer "county" and I use it as follows:
<asp:repeater id="Repeater1" runat="server">
<ITEMTEMPLATE>
<%county++; %>
<%# ImageOutput(Container, county ) %>
<%# DataBinder.Eval(Container.DataItem, "AreaName") %><br>
</ITEMTEMPLATE>
</asp:repeater>
As you can see - I increment "county" in the repeater. This is
available in the code behind but when I pass "county" over to my
ImageOutput routine it doesn't get passed properly.
I thin that it's something to do with the <%# ... %> style blocks but
to tell the truth my training nexver explained these 100% so I've just
been using them a little blindly.
Can anyone explain exactly why a variable would not be available within
them?
need to do is display the first X items slightly differently. To enable
this I have a public integer "county" and I use it as follows:
<asp:repeater id="Repeater1" runat="server">
<ITEMTEMPLATE>
<%county++; %>
<%# ImageOutput(Container, county ) %>
<%# DataBinder.Eval(Container.DataItem, "AreaName") %><br>
</ITEMTEMPLATE>
</asp:repeater>
As you can see - I increment "county" in the repeater. This is
available in the code behind but when I pass "county" over to my
ImageOutput routine it doesn't get passed properly.
I thin that it's something to do with the <%# ... %> style blocks but
to tell the truth my training nexver explained these 100% so I've just
been using them a little blindly.
Can anyone explain exactly why a variable would not be available within
them?