Reputation: 1298
I am loading 25000 records into my gridview with 70 Columns and it is crashing.
Why is it crashing?
Upvotes: 1
Views: 2441
Reputation: 30865
Gridviews are known to cause an out-of-memory exception when displaying tens of thousands of rows (1.7 million cells, in your case).
You may consider setting EnableViewState to False; that is, if you don't plan on allowing editing.
If your application requires you to write 25k results to the screen and you are constrained from using paging, then you should probably be emitting text to the screen via dumping the contents of a StringBuilder into a Literal, rather than using a Gridview.
With that said, everything points to a broken design. There are very few legitimate reasons to dump that many records into a webpage.
Upvotes: 7