I have a list of objects produced.
after click on next I want to display the next product in the form
in my asp page I have the following form:
In my code-behind:
But it seems as ASP doesn't like this. Have u got an idea? thk u.
after click on next I want to display the next product in the form
in my asp page I have the following form:
Code:
<form id="formNF" runat="server">
<asp:TextBox ID="txtRef" runat="server"></asp:TextBox>
<asp:TextBox ID="txtArticle" runat="server"></asp:TextBox>
<asp:TextBox ID="txtQauntity" runat="server"></asp:TextBox>
<asp:Button ID="ButtonNext" runat="server" Text="Next product" OnClick="ButtonNext_Click"/>
</form>
Code:
private int i;
protected void ButtonNext_Click(object sender, EventArgs e) {
int nbrproducts = command.getListeproducts().Count;
i++;
for(i=0;i<nbrproducts;) {
mdeTxtRef.Text = command.getListeproducts()[i].Ref;
mdeTxtQte.Text = command.getListeproducts()[i].Qte;
}
}
Comment