“Imagination is more important than knowledge. For while knowledge defines all we currently know and understand, imagination points to all we might yet discover and create.” - Albert Einstein


Stream Data-Pages in ASP.NET Using GridView and SqlDataReader

This is my first blog entry. I am starting this blog to document ideas and most of the time - how these ideas were implemented. This will serve as a note and reminder for me and hopefully it will help other people (such as I.T. professionals) like you. This article is the first of two or three parts.

Let us move on directly to the topic I will be discussing. Say we have a time-consuming SQL query with the following characteristics:
  1. The time of completion of execution is at T60 (e.g. 60 seconds)
  2. The time-to-first-record* is at T10 (e.g. 10 seconds)
  3. The SQL query is already fully optimized 
*Note: for the purpose of this article, time-to-first-record is the point in time when the first row becomes available in the buffer for reading using SqlDataReader’s Read method.

The objective is to be able to respond to the web request as soon as possible by showing some data to the browser while a background thread continues to pull data from the data store. In other words, as soon as there are enough rows available for the first data-page, we can bind that data to the GridView and render it to the client while more data is retrieved and buffered on the background. This strategy is quite common in windows applications, but how can we achieve this in a web application? Here are four simple strategies we will use to achieve this.
Read more »

Labels: , , , , , , , , , , , , , , , ,

 Subscribe to feed


John Eric Sobrepena

John Eric Sobrepena
Hi, I am an I.T. professional who loves technology. I am right now into Android development. I am also a subject matter expert on C#, ASP.NET, WPF and Silverlight. Photography is one of my many hobbies.
Bookmark and Share

Type your Email

Follow me on Twitter.
  • i am working on a web form application where i used girdview and there i want to implement paging and sorting but the thing is that how can i eliminate the calling of store procedure eveytime for paging and sorting as i cant use session / view state/ cache / hidden field / or anything that load more on server / browser

    - Anonymous Anonymous | Wednesday, 18 March, 2026

Flickr Photostream



 Subscribe to feed


Powered by Blogger



© 2006 IdeaSparx | Blogger Templates by GeckoandFly.
No part of the content or the blog may be reproduced without prior written permission.