views:

35

answers:

1

I am doing some grid work just like a stock exchange application which will have good data volume and page should be automatically refresh after some mentioned time say 1 min or 30 sec without being post back.

What is best way to do this ? Should I use grid with ajax or grid with ajax and web service should be used ? If possible please refer me some article or link on implementation of your suggestion.

+1  A: 

You can use an UpdatePanel (place the grid inside the panel) and maybe have a JavaScript timer to update the panel periodically.

Alternatively you can have a straight HTML table and periodically call a webservice and update the table from the client side. I think you would get slightly better performance but there is a bit more work involved.

A webservice call from JavaScript will not cause a postback. When calling a webservice you might get better performance because you are only getting data instead of formatted HTML. However, you will probably return the data in XML or Json format, so there will be an overhead (Json will be better in that respect).

If you know that only a small portion of values are going to change between two refreshes, then you will get better performance by only returning the values that have changed.

If you're not very experienced with JavaScript then I would suggest that you use a library such as jQuery. You may read the following resources for implementation details:
Calling an ASP.NET webservice with jQuery
Updating an HTML table from Json data using jQuery

Depending how experienced you are with webservices, Json and jQuery, it may not be an easy task. The UpdatePanel option is definitely easier to implement.

Xavier Poinas
UpdatePanel is by far the easiest/quickest way. Sort of a poor mans ajax.
Mikael Svenson
Thanks Xavier,I already tried update panel but it was very lazy in loading because of quantity of data. Regarding alternate suggestion, I will try that. Please explain some points in this regard.1. If I use web services with HTML table will it cause post back ? (sorry I have not used services before)2. Any link please on its implementation details ?3. Can there be some way I can use grid with ajax without update panel where there may no html traveling but just data.thanks
haansi
Updated my answer to address your new questions.
Xavier Poinas