Slow Execution of an ASP.NET Web Page
I have a web page which brings 13K+ records in 20 seconds. There is a menu on the page, clicking on which navigates me to another page which is very lightweight. Displaying the data (13K+) took only 20 seconds whereas navigating from that page took much longer, more than 2 minutes. Can you tell me why the latter is taking so much time? I've stopped the page_load code execution on click of the menu.
I've disabled the viewstate for that page as well.
I am stopping the page load when menu is clicked by finding out what triggered the postback, if it is the menu item then the code is not executed.
if(!IsPostBack || (IsPostBack && request.params["Event_Target"].Contains("TreeView1")))
{
//Code goes here..
}
I am using IE 6.0.
Only after the first page finishes loading, I'll be able开发者_运维知识库 to scroll through the page. Second page loads few labels and text boxes, no processing on page_load.I am not sure where exactly the time is spent because if I move between two light pages, then it's pretty fast, but if I load a huge resultset on a page and then I try to move to some other page, it takes unusually long.
I just placed ajax update panel on my page and what a difference. Navigating to the other page takes less than 2 seconds.
精彩评论