ASP.NET Web Forms / VB.NET app, how do you prevent GridView from expanding?
This is my first attempt to create a "ASP.NET Web Forms application". I am using VB.NET as the language.
I am having trouble getting the GridView control to stay the same size instead of expanding when there are more than 3 or 4 rows. I want it to always stay the same size on the page as I am going to add more to the page under it and don't want it to expand over the top of those items.
Things I have tried:
- setting the Height property of the GridView to 140px
- Added "; overflow:auto" Height="140px"" as shown in code below to get vertical scroll bars and to and limit height. (neither which appear to have any effect)
I don't want to limit the number of rows that can be displayed, just the space that it can take up and use vertical scroll bar to view all the records in that space.
I'm new to the ASP.NET and how it works with the VB.NET. I didn't know about the need for the DIV.
I added the DIV and put my GridView in it, but it still expand out larger. What did I do wrong? Here is the ASP as it looks now:
Open in new window