Reputation: 203
I have a gridview on an ASP page displayed on www.myurl.com/page1. It displays data that can be modified by other computers using a different page (www.myurl.com/page2) on the same website. I'd like to make it such that when user 1 adds data, the gridview on user 2's page refreshes with the new data (but it's not the same exact data).
Is there a way that the gridview can be notified of a data update? Or do I just resort to 10 second refreshes (which I'd like to avoid)?
Upvotes: 0
Views: 124
Reputation: 136
You can use the Ajax UpdatePanel in your application which works like this: https://msdn.microsoft.com/en-us/library/bb399001.aspx
Use an Ajax timer control along with the gridview in the UpdatePanel to refresh the grid for every 5/10 seconds. In this way, only the gridview part of it gets refreshed and not the entire page.
http://www.devcurry.com/2009/03/how-to-refresh-aspnet-gridview.html.
Possible duplicate question : asp.net refresh web page on DB changes
Upvotes: 1