469,625 Members | 1,066 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,625 developers. It's quick & easy.

Force ASP.NET 2.0 page refresh when the database is updated

Hello!

I have an ASP.NET page that displays some data from an SQL Server 2005
database, using a Select query. The database is updated by another piece of
software, independently of the ASP.NET page. The ASP.NET page only displays
data and it has nothing to do with inserting or updating data.

What is the best way to force the refresh of the ASP.NET page every time a
new record is inserted in the table?

I tried to implement SQL Server cache dependency/invalidation but although
the page returned no errors, I couldn't manage to make it refresh.

Thank you in advance,
Hrvoje
Jun 27 '08 #1
2 2022
You can't do much more than polling either by :

- refreshing at a regular interval (for example using setTimeOut client side
or a refresh meta tag)
- if this is costly you could perhaps issue an out of band call that will
just see if a refresh is needed and do the actual refresh based on the
result ?...

Some more details about the exact context could also help...

--
Patrice

"Hrvoje Vrbanc" <hr*****@recro.hra écrit dans le message de groupe de
discussion : #H**************@TK2MSFTNGP06.phx.gbl...
Hello!

I have an ASP.NET page that displays some data from an SQL Server 2005
database, using a Select query. The database is updated by another piece
of software, independently of the ASP.NET page. The ASP.NET page only
displays data and it has nothing to do with inserting or updating data.

What is the best way to force the refresh of the ASP.NET page every time a
new record is inserted in the table?

I tried to implement SQL Server cache dependency/invalidation but although
the page returned no errors, I couldn't manage to make it refresh.

Thank you in advance,
Hrvoje
Jun 27 '08 #2
It is simple not possible to force a refresh like this because of the
inherent nature of the web.

The closest thing you can do is polling like the other person suggested.
"Hrvoje Vrbanc" wrote:
Hello!

I have an ASP.NET page that displays some data from an SQL Server 2005
database, using a Select query. The database is updated by another piece of
software, independently of the ASP.NET page. The ASP.NET page only displays
data and it has nothing to do with inserting or updating data.

What is the best way to force the refresh of the ASP.NET page every time a
new record is inserted in the table?

I tried to implement SQL Server cache dependency/invalidation but although
the page returned no errors, I couldn't manage to make it refresh.

Thank you in advance,
Hrvoje
Jun 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Martin | last post: by
2 posts views Thread by Jonathan Driller | last post: by
19 posts views Thread by Jay | last post: by
1 post views Thread by Marco Maroni | last post: by
2 posts views Thread by Oenone | last post: by
2 posts views Thread by =?Utf-8?B?U2lsa0NpdHlGbG9yaWRh?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.