Solved

Ajax or PageAsyncTask Asynchronous Loading of SQLDataSource Controls

Posted on 2010-09-02
4
1,225 Views
Last Modified: 2012-05-10
I have several pages that are now taking forever to load. I have been playing with using the RegisterAsyncTask approach, and while I can get the page to load with the SQLDataSources still churning away in the backgroud, I don't get a page refresh when they are done. I put the Async = True and set AsyncTimeout=1 in the page declaration, this is clearly the wrong way to do this.  Any advice on how to properly using Ajax or not deal with the loading of data.

This project is done using VB.Net 3.5
0
Comment
Question by:clintnash
  • 2
  • 2
4 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 33612542
How large are your pages?  How big is the ViewState?  Do you have a lot of SqlDataSource controls?
0
 
LVL 1

Author Comment

by:clintnash
ID: 33612795
The page has roughly 40 controls on it, about 12 are databound.  I am not sure how to answer the question as to how big is the viewstate and yes there are roughly 16 sqldatasource controls on the page.  The issue is with one sqldatasource control in particular.  It refreshes the data from a linked MySQL server into a table in the MySQL database.  When we tried to work directly from the linked server the performance was so bad the users refused to use the application.  So we preload now and the app performance is good, but as I said above the pages take forever to load and users are closing the browser because they think its not working.  I have made some progress on this using an updateprogress control, but I am curious if there is a better way to approach user notification of background processing.
0
 
LVL 1

Author Comment

by:clintnash
ID: 33612798
Sorry, error in my last comment, the line that read

from a linked MySQL server into a table in the MySQL database

Should have been

from a linked MySQL server into a table in the SQL database
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 33612984
There are different ways to approach this problem.  One way to look at the ViewState is to use a decoder, like Scott Guthrie describes here:

Cool Viewstate Decoder
http://weblogs.asp.net/scottgu/archive/2003/02/16/2495.aspx

"Light" reading about some possible solutions:

10 Tips for Writing High-Performance Web Applications
http://msdn.microsoft.com/en-us/magazine/cc163854.aspx

Page size can really reduce performance, and there are ways to look at reducing the page size:

How To Reduce Page Size In ASP.NET
http://www.beansoftware.com/ASP.NET-Tutorials/Reduce-Page-Size.aspx

Another approach to the ViewState is described here:

Determining an ASP.NET Page's View State Footprint
http://scottonwriting.net/sowblog/archive/2010/07/06/programmatically-determining-an-asp-net-page-s-view-state-footprint.aspx
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question