Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
I have a page call A.aspx and on this page have a gridview/datagrid/listview etc. with some records. In this gridview, I have out a delete button for delete the record from the database.

Now my question is that, If a user delete a record from gridview so how will i notify or refresh the gridview if 10 more users has opened A.aspx that time.

For Example:- A.aspx page has opened by 10 users and have 20 records in the gridview. Now any user delete any record from griview so 9 records are left but only that user know that 9 records are left. So I want to notify or refresh for other 9 users as well.

No silverlight, WCF please only ASP.Net.
Posted

1 solution

There is no way to refresh the other pages. ASP.NET is a disconnected environment, once the page is rendered and sent to the browser the server has no knowledge of what goes on unless a postback or other type of request happens. You can't push content to the client without some type of open connection.

The typical solution for this type of problem is to have a JavaScript method to refresh the page at a specified interval. This could be done with AJAX to eliminate page flashing and make it unnoticeable to the user.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900