Is it possible to add paging for content foremed using repeaters
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<div class="row">
<div class="col-sm-6">
<!--One card-->
<div class="card" style="width: 90%">
<div class="card-body">
<asp:Label ID="Label3" runat="server" Text="Name"></asp:Label>
</div>
</div>
</div>
</div>
</ItemTemplate>
</asp:Repeater>
By doing this i get cards according to the data in the database one under the other this will not be practical if there are a lot of data
will i be able to implement paging for this
First 1 2 3...... Last
I am not using a datatable DataTable dt = new DataTable();
I am using DataSet ds = new DataSet();
How to change the code
//save the result in data table
DataTable dt = new DataTable();
ad.SelectCommand = cmd;
ad.Fill(dt);
//Create the PagedDataSource that will be used in paging
PagedDataSource pgitems = new PagedDataSource();
pgitems.DataSource = dt.DefaultView;
pgitems.AllowPaging = true;
according to the one i use below
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(ds);
Repeater1.DataSource = ds;
I cant put
pgitems.DataSource = ds.DefaultView;
it gives me an error