Sto costruendo un carrello e in sessione ho tutte le mie variabili che scorporo in un datarow e visualizzo nel repeater:
codice:
<ItemTemplate>
<tr>
<td>
<%# Server.HtmlDecode(DataBinder.Eval(Container.DataItem, "Articolo").ToString())%>
</td>
<td>
<%# Server.HtmlDecode(DataBinder.Eval(Container.DataItem, "Prezzo").ToString())%>€
</td>
<td>
<asp:TextBox ID="tb" runat="server" Width="20px" Text='<%# Server.HtmlDecode(DataBinder.Eval(Container.DataItem, "Quantita").ToString())%>'></asp:TextBox>
</td>
<td>
<asp:Label ID="Label1" runat="server" Text=''><%#StrTot((string)DataBinder.Eval(Container.DataItem, "Prezzo"), (string)DataBinder.Eval(Container.DataItem, "Quantita"))%>€</asp:Label>
</td>
<td>
<asp:LinkButton ID="lnk" Text="AGGIORNA" CommandArgument='<%# Server.HtmlDecode(DataBinder.Eval(Container.DataItem, "Quantita").ToString())%>' CommandName='<%# Server.HtmlDecode(DataBinder.Eval(Container.DataItem, "Prezzo").ToString())%>' onClick="btclick" runat="server"></asp:LinkButton>
</td>
</tr>
</ItemTemplate>
Quello che voglio ottenere è che modificando la quantità e cliccando su aggiorna venga aggiornato il totale.
Per cui se io clicco il pulsante aggiorna2, andrei a pescare il prezzo2 e lo moltiplicherei per la textbox2 mettendo il risultato nella label2.
Se non fila il mio ragionamento accetto ovviamente consigli.