Поддерживайте проверенные значения на разных страницах в управлении ретранслятором
I have a Datalist Control, where there are multiple rows(3 rows per page).Each row has a checkbox as well. My requirement is that I want the checked items to come down in the Repeater control when I press the "Checkout" Button. But when I go to the next page the checked items on the previous page gets reset.
Что я уже пробовал:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" MaintainScrollPositionOnPostback="true" %> <!DOCTYPE html> <title>DL-A1 <div> <asp:DataList ID="DataList1" runat="server" DataKeyField="bookid"> <itemtemplate> <table><tbody><tr><td> </td><td> Title: <%# Eval("booktit") %><br> Author: <%# Eval("bookaut") %><br> Publisher: <%# Eval("bookpub") %><br> Prc: <%# Eval("bookprc") %><br> <asp:CheckBox ID="CheckBox1" runat="server" Text="Buy" Font-Bold="True" /><br> </td></tr></tbody></table> <asp:Repeater ID="rptPaging" runat="server" OnItemCommand="rptPaging_ItemCommand"> <itemtemplate> <asp:LinkButton ID="lnkPage" runat="server" CommandName="Page" CommandArgument="<%# Container.DataItem %>"><%# Container.DataItem %> <br> <asp:Label ID="lbl1" runat="server" Text="Label" Font-Bold="True"> <br> <br> <asp:Button ID="Button1" runat="server" Text="Checkout" OnClick="extractCheckedVal" Font-Bold="True" Font-Size="X-Large" /><br><br><br> <asp:Repeater ID="Repeater1" runat="server"> <headertemplate> Total number of checked items: <%= v_tot %> <br> Selected Items Are: <itemtemplate> <table><tbody><tr><td> </td><td> Title: <%# Eval("booktit") %><br> Author: <%# Eval("bookaut") %><br> Publisher: <%# Eval("bookpub") %><br> Prc: <%# Eval("bookprc") %><br> </td></tr></tbody></table> </div>