Greetings again experts.
I have gridview textbox control with ID called txttaxpayerret. It takes numerica value. Rows are also dynamically added. In other words, user enters value for txttaxpayerret, can click the Add more row button to add more values this control.
Then I have a label control with ID called lblTotal. The cumulative total of all the values entered into the txttaxpayerret control needs to be stored in lblTotal control. How do I do this?
I tried to use an example I saw here but it didn't work for me simply because lblTotal is not part of Gridview control.
Thanks for your help as always.
<table border="1" style="width:50%;text-align:center">
<tr>
<td style="width:100%;vertical-align: text-top;">
<asp:gridview ID="Gridview1" style="table-layout:fixed;" runat="server" ShowFooter="true" AutoGenerateColumns="false" OnRowDeleting="Gridview1_RowDeleting">
<Columns>
<asp:BoundField DataField="RowNumber" Visible="false" HeaderText="Row Number" />
<asp:TemplateField HeaderText="B - BOATS AND MOTORS - INCLUDE ALL CRAFT IN AND ABOVE <br /> THE WATER, THE MOTORS BUT NOT THE LAND TRANSPORT VEHICLES (TRAILERS).">
<headerstyle horizontalalign="Left" />
<ItemTemplate>
<asp:TextBox ID="txtboatregNum" runat="server" style="width:595px;" class="form-control"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="TaxPayer Returned Value <br />As of Jan This Year">
<ItemStyle HorizontalAlign="Left"></ItemStyle>
<ItemTemplate>
<asp:TextBox ID="txttaxpayerret" runat="server" style="width:327px;" class="form-control txttaxpayerret numeric"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="For Tax Office use Only <br /> (Tax Assessirs Value)">
<ItemStyle HorizontalAlign="Left"></ItemStyle>
<ItemTemplate>
<asp:TextBox ID="txtfortaxofficeonly" runat="server" style="width:306px;background-color:#ECECEC;" readonly="true" class="form-control"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="">
<HeaderStyle Width="70" />
<ItemStyle Width="70" />
<ItemTemplate>
<asp:Button ID="ButtonAdd" runat="server" Text="Add"
onclick="ButtonAdd_Click" CssClass="grvAddButton" />
</ItemTemplate>
</asp:TemplateField>
<asp:CommandField ShowDeleteButton="True"><ControlStyle CssClass="grvDelButton" /></asp:CommandField>
</Columns>
</asp:gridview></td>
</tr>
</table>
<table border="1" style="width:80%;text-align:center">
<tr>
<td style="width:44.9%;">TOTAL ></td><td style="width:24.9%;"><asp:Label ID="lblTotal" runat="server"></asp:Label></td><td class="auto-style4"></td>
</tr>
</table>