Solved

Ajax or PageAsyncTask Asynchronous Loading of SQLDataSource Controls

Posted on 2010-09-02
4
1,228 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Suggested Courses

738 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