IMO have a look at the source code created for this construction. It's
likely created as distinct pieces of code or something preventing the "i"
variable to be know accross distinct pieces of code.
Note also that this is probably because ASP.NET doesn't just copy any more
the "HTML" fragments to the output stream. Server side tags needs to be
processed server side in a more complex manner and the code fragments have
to fit in this scheme.
Patrice
--
"TomislaW" <to*********@hotmail.com> a écrit dans le message de
news:eJ**************@TK2MSFTNGP15.phx.gbl...
why this is not possible in asp.net?
error:
CS0103: The name 'i' does not exist in the class or namespace...
<%
int i = 0;
%>
<asp:Repeater ID="RepeaterSoba" Runat="server" EnableViewState="False"
DataSource='<%# (DataBinder.Eval(Container.DataItem, "EtazaId"))%>'>
<HeaderTemplate>
<table width="100%" border="0" cellpadding="0" cellspacing="0"
ID="Table2"> </HeaderTemplate>
<ItemTemplate>
<%
i = i + 1;
%>