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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hrvoje Vrbanc

    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


  • Patrice

    #2
    Re: Force ASP.NET 2.0 page refresh when the database is updated

    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" <hrvojev@recro. hra écrit dans le message de groupe de
    discussion : #HlP$PAvIHA.547 2@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
    >

    Comment

    • =?Utf-8?B?Tkg=?=

      #3
      RE: Force ASP.NET 2.0 page refresh when the database is updated

      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
      >
      >
      >

      Comment

      Working...