How to auto refresh the ASP.NET form?

Discussion in 'ASP .Net' started by =?Utf-8?B?ZGF2aWQ=?=, Dec 8, 2005.

  1. I do not have the experience with it. For example, update the data in the ASP
    form every minute by retrieving data from database. Or do you have other
    methods?

    Thank you for any advice and information about it.

    David
     
    =?Utf-8?B?ZGF2aWQ=?=, Dec 8, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?ZGF2aWQ=?=

    Patrice Guest

    What is the whole picture ?

    This is mostly done with a meta tag that allows to trigger the page refresh.
    Depending on what you are trying to do you may have also to do this
    programmatically so that you can check for user input to avoid refreshing
    while the user does something else (basically using setTimeout for
    example)...

    --
    Patrice

    "david" <> a écrit dans le message de
    news:...
    > I do not have the experience with it. For example, update the data in the

    ASP
    > form every minute by retrieving data from database. Or do you have other
    > methods?
    >
    > Thank you for any advice and information about it.
    >
    > David
     
    Patrice, Dec 8, 2005
    #2
    1. Advertising

  3. Hi David,

    There are 2 aspects to this task:
    1- The browser display being refreshed every fixed interval: As Patrice
    responded in an earlier post, you achieve this using a meta tag in the aspx
    markup. For example to cause the browser to refresh the page every 2 minutes:
    <META HTTP-EQUIV="REFRESH" CONTENT=120>

    2- The dataset:

    a. For example, if you have a dataset of the navigational
    menu entries for a website, you can retrieve it once, save it in the
    application cache (to be used by every visitor of the site) and only refresh
    the cache if the database entries have been updated. In ASP.NET 1.01 you
    might use the CacheDependency, e.g.:
    'assuming that a change in the database would save a control file on the
    webserver
    'start tracking any change to the control file
    Dim MenuControlFile As New System.Web.Caching.CacheDependency("Control.txt",
    Now())
    'save your menu items dataset in the cache to be retrieved whenever needed
    in the applicaion
    'by writing: DataSet myDataSet = Ctype(Cache("MyMenu"), DataSet)
    Cache.Insert("MyMenu", ds, MenuControlFile)

    b. If you are using ASP.NET 2.0 with SQL server 2005 then
    you might consider the “Sql Server 2005 Notification-based Cache Invalidationâ€
    http://66.129.71.130/QuickStartv20/aspnet/doc/caching/SQLInvalidation.aspx

    --
    HTH,
    Phillip Williams
    http://www.societopia.net
    http://www.webswapp.com


    "david" wrote:

    > I do not have the experience with it. For example, update the data in the ASP
    > form every minute by retrieving data from database. Or do you have other
    > methods?
    >
    > Thank you for any advice and information about it.
    >
    > David
     
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=, Dec 8, 2005
    #3
  4. Thank both of you.

    My example is a chekout list of patients, or a process list of procesures.
    So each role player can view her/his list to process the role's job and give
    the input to other role's job list which will be done by others based on the
    list of items, and so on.

    Each role list would be auto refreshed in a certain interval.

    I will try it based on your advice.

    David

    "Phillip Williams" wrote:

    > Hi David,
    >
    > There are 2 aspects to this task:
    > 1- The browser display being refreshed every fixed interval: As Patrice
    > responded in an earlier post, you achieve this using a meta tag in the aspx
    > markup. For example to cause the browser to refresh the page every 2 minutes:
    > <META HTTP-EQUIV="REFRESH" CONTENT=120>
    >
    > 2- The dataset:
    >
    > a. For example, if you have a dataset of the navigational
    > menu entries for a website, you can retrieve it once, save it in the
    > application cache (to be used by every visitor of the site) and only refresh
    > the cache if the database entries have been updated. In ASP.NET 1.01 you
    > might use the CacheDependency, e.g.:
    > 'assuming that a change in the database would save a control file on the
    > webserver
    > 'start tracking any change to the control file
    > Dim MenuControlFile As New System.Web.Caching.CacheDependency("Control.txt",
    > Now())
    > 'save your menu items dataset in the cache to be retrieved whenever needed
    > in the applicaion
    > 'by writing: DataSet myDataSet = Ctype(Cache("MyMenu"), DataSet)
    > Cache.Insert("MyMenu", ds, MenuControlFile)
    >
    > b. If you are using ASP.NET 2.0 with SQL server 2005 then
    > you might consider the “Sql Server 2005 Notification-based Cache Invalidationâ€
    > http://66.129.71.130/QuickStartv20/aspnet/doc/caching/SQLInvalidation.aspx
    >
    > --
    > HTH,
    > Phillip Williams
    > http://www.societopia.net
    > http://www.webswapp.com
    >
    >
    > "david" wrote:
    >
    > > I do not have the experience with it. For example, update the data in the ASP
    > > form every minute by retrieving data from database. Or do you have other
    > > methods?
    > >
    > > Thank you for any advice and information about it.
    > >
    > > David
     
    =?Utf-8?B?ZGF2aWQ=?=, Dec 8, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?V2FyYW4=?=

    Auto-Suggested Textbox like google auto suggest

    =?Utf-8?B?V2FyYW4=?=, Apr 20, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    8,528
    inrakeshworld
    Jul 27, 2007
  2. arvindmewara
    Replies:
    0
    Views:
    995
    arvindmewara
    Sep 8, 2007
  3. linkswanted
    Replies:
    1
    Views:
    926
  4. avner_e

    auto refresh to a mobile form

    avner_e, Jun 17, 2004, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    139
    avner_e
    Jun 17, 2004
  5. Abe Hills

    Auto refresh asp

    Abe Hills, Jul 21, 2003, in forum: ASP General
    Replies:
    1
    Views:
    187
    Adrienne
    Jul 21, 2003
Loading...

Share This Page