Its not possible automatically. You need to do this in a event.
For example you can write code to refresh your page every 1 minute (or whatever time you prefer). If the Data display code is in the Page Load event then the current data will be retrieved and shown automatically. Its time consuming and irritates the user also.
So, you can specify a button "Refresh Data" and write the code on the click event of the button to show the current data!
Main Topics
Browse All Topics





by: dxz2Posted on 2004-01-21 at 03:46:43ID: 10163835
Hi,
the problem is that when your browser opens the page,it opens it from the cache and not from the sourse..
so in order to make the browser no to do that everytime you opens
the page you have to write in the header of every page the following:
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
but the best way to make this if you are using more that one page to view the data is
to make one asp file that contains a code inside it,and just include it to every page
by writing the include statment at the top of every page.
Example.
this is the ASP file that you need ,you have to save it as no_cache.asp,
<%
Response.Expires = 60
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
Response.Write "<script language='JavaScript'>"
Response.Write "window.status=' '"
Response.Write "</script>"
%>
then include it like the following on the page top,where you want to view the data:
<!-- #include file="no_cahce.asp" -->