How do I create a repeater with fixed size that has scrollbars?

I would like to embed a repeater in my page that is 600x400. If the size of the repeater is greater than the defined size I would like scrollbars to appear.
Who is Participating?
Snarf0001Connect With a Mentor Commented:
Easiest way would be to wrap the repeater in a div with the overflow set in css:

<div style="width:600px; height:400px; overflow:scroll;">

        <asp:Repeater ID="Repeater1" runat="server"></asp:Repeater>

Note that the div could also be set in the repeaters HeaderTemplate and FooterTemplate, but then it won't show up at all if the repeater doesn't have ANY data.
tatton777Author Commented:
Is there a way to get it to just pop up scrollbars for the vertical?
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Try overflow:auto; instead of scroll.
Ashutosh VyasFounder, InitQubeCommented:
Or if you are okay with using the Panels. I have been using it all along.

<asp:Panel ID="pnlContainer" runat="Server" Width="100%" Height="300px" ScrollBars="Auto">
            <asp:Repeater.................................... />
tatton777Author Commented:
Thanks for your help!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.