-1

I'm new to this site and asp.net (I'm coming from a classic asp background). I'm hoping someone could help me add a paging function to a repeater? I've tried following some other tutorials I've found but i keep hitting a brick wall. Here's my code:

<form runat="server">
                <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">


      <ItemTemplate>

      <div class="middlebar"><!--middlebar -->

          <div class="middlebartext"><!--middlebartext -->
                <small><asp:Label runat="server" ID="Label5"text='<%# Eval("PMonthName")%>' /><br /><asp:Label runat="server" ID="Label6" text='<%# Eval("PDay")%>' /></small>
          </div><!--middlebartext -->
<div class="middlebarcorner"><img src="Images/cornermiddle.png" alt="Corner Ribbon Image" /></div><!--middlebarcorner -->
            <div class="middlebartexttitle"><asp:Label runat="server" ID="Label3" 
                  text='<%# Eval("Header")%>' /><br />
                <div class="middletextauth">Added By:  <asp:Label runat="server" ID="Label2" 
                  text='<%# Eval("AddedBy")%>' /></div><!--middletextauth -->
                <div class="middletextkw">Keywords: <span class="grey">key, words, test, file</span></div><!--middletextkw -->

            </div><!--middlebartexttitle -->
        </div><!--middlebar -->
          <br />

          <asp:Label runat="server" ID="Label4" 
                  text='<%# Eval("PContent")%>' />

         <div class="ruler"></div>



      </ItemTemplate>



  </asp:Repeater>

            </form>



        <asp:SqlDataSource 
      ConnectionString=
          "<%$ ConnectionStrings:Conn %>"
      ID="SqlDataSource1" runat="server" 
      SelectCommand="SELECT * from DBNAME where Deleted = 'False' Order By DateAdded DESC">

  </asp:SqlDataSource> 
Ben Williams
  • 131
  • 1
  • 1
  • 17
  • For all those like me who are trying to make a repeater for a list of date, may i suggest using a listview instead. With a list view you can use data paging function within visual studio. I followed this tutorial and found it very helpful: [Using ASP.NET 3.5's ListView and DataPager Controls](http://www.4guysfromrolla.com/articles/021308-1.aspx) – Ben Williams May 16 '13 at 09:51

3 Answers3

1

please check below links and let me know if this helps you

http://www.dotnetcurry.com/ShowArticle.aspx?ID=345

http://www.codeproject.com/Articles/31819/Pagination-with-Repeater-Control

chetanya gehlot
  • 564
  • 4
  • 11
  • 7
    Please summarize the content you link : the day the link is broken, your answer is worth nothing. – Vince May 14 '13 at 11:01
0

Kindly check out these tutorials ::

Pagination-with-Repeater-Control

Custom Paging with the ASP.NET Repeater Control

paging-repeater

paging-with-an-asp-net-repeater

Community
  • 1
  • 1
ebram khalil
  • 8,252
  • 7
  • 42
  • 60
  • Hi - Thanks for the answer... I've found these ones myself but I'm struggling to get them to work - as i say, I'm new to asp.net and they all seem overly complicated compared to classic asp. Do you know of any tutorials that breaks this down into more manageable chucks for the newbies? :-) – Ben Williams May 14 '13 at 10:44
0

For all those like me who are trying to make a repeater for a list of date, may i suggest using a listview instead. With a list view you can use data paging function within visual studio. I followed this tutorial and found it very helpful:

Using ASP.NET 3.5's ListView and DataPager Controls

Ben Williams
  • 131
  • 1
  • 1
  • 17