How to display in a form the next object of a collection?
<p>I have a list of objects produced.
after click on next I want to display the next product in the form</p>

<p>in my asp page I have the following form:</p>

<pre><code>&lt;form id="formNF" runat="server"&gt;

&lt;asp:TextBox ID="txtRef" runat="server"&gt;&lt;/asp:TextBox&gt;
&lt;asp:TextBox ID="txtArticle" runat="server"&gt;&lt;/asp:TextBox&gt;
&lt;asp:TextBox ID="txtQauntity" runat="server"&gt;&lt;/asp:TextBox&gt;


&lt;asp:Button ID="ButtonNext" runat="server" Text="Next product" OnClick="ButtonNext_Click"/&gt;
&lt;/form&gt;
</code></pre>

<p>In my code-behind:</p>

<pre><code>private int i; 
protected void ButtonNext_Click(object sender, EventArgs e) { 
     int nbrproducts = command.getListeproducts().Count; 
     i++; 
     for(i=0;i&lt;nbrproducts;) { 
       mdeTxtRef.Text = command.getListeproducts()[i].Ref; 
       mdeTxtQte.Text = command.getListeproducts()[i].Qte; 
     } 
} 
</code></pre>

<p>But it seems as ASP doesn't like this. Have u got an idea? thk u. </p>
