简体   繁体   中英

ASP.NET Events not firing in page containing large GridView control

I have a GridView control on an ASP page, which I've bound to a large(ish) datasource (about 10k rows, with 24 varchar(50) columns). The page also has a seperate (ie not in the GridView) button control.

The problem is; clicking on the button doesn't appear to fire either the PageLoad or the Button___click events, all I get is a 'Cannot display page' error..

Interestingly, if I reduce the size of the dataset behind the GridView, everything works fine and events are fired as expected. So i'm assuming its some sort of timeout or overflow related to the amount of data on the page.

I don't particularly want to use paging if I can get away with it, so the question is, is there some sort of timeout or setting that I can change to allow handling of large grids of data?

Have you tried turning off ViewState (EnableViewState=false in your Page directive) on your page? I would imagine that with a 1.2MB table, the ViewState is pretty huge and it may be overwhelming the parameter handling on the page.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM