1

To put it as simple as I can. I have a website and the homepage is populated with an ASP Repeater control. This shows details of people you follows activities on the site within the last 30 days.

My problem being I dont want my homepage to be too long on loading if you follow lots of people and they have been participating in lots of recent activities, meaning the repeater will be extremely long and hence my page being stretched.

What I want is for the repeater to show say 15 items/rows then below this is a 'Show more' link which will show either show the rest or each time you click shows another 15 (either/or I will be happy with!)

Here is my repeater code...

<asp:Repeater ID="RptNewsFeed" runat="server" 
onitemdatabound="RptNewsFeed_ItemDataBound">
<ItemTemplate>
    <div class="NewsFeedItem">
        <div class="ProfileImageContainer">
            <asp:HyperLink ID="HlkProfileImageLink" runat="server" EnableViewState="false">
                <asp:Image ID="ImgProfileImage" runat="server" EnableViewState="false" />
            </asp:HyperLink>
        </div>
        <div class="ProfileLinkContainer">
            <asp:HyperLink ID="HlkProfileLink" runat="server" EnableViewState="false" CssClass="ActionDoneBy"></asp:HyperLink>
            <asp:Label ID="LblAction" runat="server" EnableViewState="false" CssClass="Action"></asp:Label>
            <asp:HyperLink ID="HlkActionObjectLink" runat="server" EnableViewState="false" CssClass="ActionDone"></asp:HyperLink>
        </div>
        <div class="TimeContainer">
            <asp:Label ID="LblActionTime" runat="server" EnableViewState="false"></asp:Label>
        </div>
    </div>
</ItemTemplate>

Thanks in advance for any help provided!

Ganesh Gaxy
  • 657
  • 5
  • 11
Paul Kirkason
  • 227
  • 2
  • 4
  • 20
  • 1
    So what's the problem? Just keen an eye on your data binding mechanism, and control the number of items you feed to repeater on each postback. – Andrei Aug 19 '14 at 10:44
  • How would i do that @Andrei? – Paul Kirkason Aug 19 '14 at 11:53
  • 1
    I am sorry, but that's a too broad question. Have you tried to do this? If not, what exactly prevents you from trying? What part of that you do not understand? – Andrei Aug 19 '14 at 12:18

0 Answers0