Question

I don't know what is the best way to force a browser refresh when using silverlight.

The scenario is like this:

  • We have a silverlight application hosted on IIS
  • Two users opens the same page and that page contains a grid with some records.
  • Only one of the users modify one record and save the data in the database

How can the other user see that the data has been modified unless he refreshes the page manually?

Should I implement some automatic refresh?

Thanks in advance

Was it helpful?

Solution

I would think long and hard about the requirements here before you open up a can of worms. Is the grid editable? With the automatic refresh idea what happens to the user who is in the middle of an edit? Think about alternatives. Could you possilbly check whether the data has changed at the point of saving data and then provide an appropriate message to the user? If you want the data to automatically refresh you are going to get into looking at server to client notifications e.g WCF duplex calls or constant polling and refreshing of the underlying bound observablecollection

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top