asp.net - Is it possible to auto increment repeater control? -
i have repeater control on web page displays images result of search. user searches keyword, , program stores search results in data table. repeater displays images in data table. so, if there 150 images in data table, repeater display 150 images. here's code repeater:
<div> <asp:repeater id="repeater1" runat="server"> <itemtemplate> <div style="background-color: silver; border-style: solid; display: inline-block; float: left; margin: 5px; overflow: hidden;"> <div style="text-align: center"> <asp:label id="lblimage" runat="server" text='<%# databinder.eval(container.dataitem, "image") %>'></asp:label> </div> <div> <%# databinder.eval(container.dataitem, "url") %> </div> <div style="text-align: center;"> <asp:hyperlink id="requestlink" runat="server" text="original" navigateurl='<%# databinder.eval(container.dataitem, "requesturl") %>'> </asp:hyperlink> </div> </div> </itemtemplate> </asp:repeater> </div>
what if, however, don't want display 150 images? there way display, say, 20 @ time , let repeater auto expand when user scrolls down or hits 'more' button, or that?
thanks!
for have search auto refresh or scroll event of mouse.
for auto refresh can write kind of code in javascript using can reload page after every interval
<script type="text/javascript"> setinterval(function () { load() }, 30000); var load = function () { location.reload(); }; </script>
and on load event of page have rebind data repeater.
Comments
Post a Comment