Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1282
  • Last Modified:

Ajax or PageAsyncTask Asynchronous Loading of SQLDataSource Controls

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
clintnash
Asked:
clintnash
  • 2
  • 2
1 Solution
 
Bob LearnedCommented:
How large are your pages?  How big is the ViewState?  Do you have a lot of SqlDataSource controls?
0
 
clintnashAuthor Commented:
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
 
clintnashAuthor Commented:
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
 
Bob LearnedCommented:
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now