First, create a web-application using Visual-Studio 2005 or later.
(Note: For visual-studio 2005, we’ll have to make this web-application ajax enabled by selecting “Asp .Net Ajax-Enabled Web-site”Template.Do note that in case of visual studio 2008, it has an in-built support for ajax, so there is no need to specify anything extra.)
Now, in Design-Mode,
Add “Timer” and “Update-Panel” controls from “Ajax Extensions” tab of Toolbox. Set Interval for the Timer (suppose 10 sec).
Add the GridView control inside the Update-Panel Control.
Now set “UpdateMode” property of Update-Panel to “Conditional“.
And set Timer as Trigger Control for Update-Panel and select “Tick” as event-name
Now, in the page_load(), Bind data to gridview.
Run the application, do any changes in database table, and u’ll find, the gridview data will be refreshed regularly at each time-interval specified(10 seconds) without any page-postback.