ASP page - Lengthy code behind firing button click
I have some asp.net page which is quite la开发者_如何学编程rge, with a table of some 200 kBytes of data... And an asp:button that takes AGES to fire the code-behind.
For instance the update progress displays for some 12 to 20 seconds before code executes!
The same code-behind fires in less than a second from a shorter page. And Javascript onclick code fires instantly.
Any idea why?
Your view state may be too large, causing all this data to travel back and forth with every postback. I suggest evaluating your view state and mitigating the display of large data via JS/JQuery on demand - on a page by page basis via ScriptService or generic handler (+JSON).
精彩评论