Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load page Asynchronously

Status
Not open for further replies.
Apr 11, 2002
193
IN
Hi,

I want to load my page Asynchronously. I tried using
Page.RegisterAsyncTask( new PageAsyncTask(new BeginEventHandler(this.BeginAsyncBindGrid),
new EndEventHandler(this.EndAsyncBindGrid), new EndEventHandler(this.TimeoutHandler), true) );

BeginEventHandler returns IAsyncResult but i dont have it as i have to create a object of a class and call a method to get the dataset. I can't call a web service and i cant use SQLCommand.BeginExecuteReader. I want to return the dataset that i am getting as ASyncResult. Is there any way to do this.

What i want to do is to load the page and then the grid should be loaded. The user shouldnt wait for the page to load as it takes time for the grid to load. Is there any other way of doing this.

I am using ASP.net 2.0.

Thanks,
Manish
 
An AsyncTask is different then an AJAX request.
AyncTasks frees threads on the server so more requests can be serviced at a given point in time. From an administrative standpoint you will see a vast improvement with high volume sites. however individual users will not notice any change in performance and a full postback will always occur.

Ajax requests allow portions of a page to change without refreshing the entire page.

for your scenario you will require an Ajax framework.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Hi,

I agree to your suggestion, but the grid in question is bounded using a server side method as i need to create its boundcolumns at runtime before binding the grid to a dataset. Is it possible somehow to call the server side method using AJAX so that i can delay the method call till the page is loaded.

Thanks,
Manish
 
AJAX was conceived with just that sort of thing in mind. Check out the ASP.NET UpdatePanel and research how to correctly cause it to update right after the page loads.

MCP, MCTS - .NET Framework 2.0 Web Applications
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top