I think the marked solution doesn't work on II7+. So here's another approach that I used for a very similar problem.
If your DB is SQL Server you could use SQLDependency, but if not the workaround would be to use a filedependency as follows.
The outputcache mechanism supports a filedependency that works beautifully. Everytime the dependency file is modified your page gets cleared automatically.
So, You can have your dataentrypage write a log/text file, upon every succesful database updates. Make the log file a dependency to the webpage in question.
So. In your webpage.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
string fileDependencyPath = Server.MapPath("~/dblog/dataupdate.txt");
Response.AddFileDependency(fileDependencyPath);
// rest of the code
}
In your dataentrypage.aspx.cs
string path = "~/dblog/dataupdatelog.txt";
if (!File.Exists(System.Web.HttpContext.Current.Server.MapPath(path)))
{
File.Create(System.Web.HttpContext.Current.Server.MapPath(path)).Close();
}
using (StreamWriter w = File.AppendText(System.Web.HttpContext.Current.Server.MapPath(path)))
{
w.WriteLine("\r\nLog Entry : ");
w.WriteLine("{0}", DateTime.Now.ToString());
string strlog = "Some additional info";
w.WriteLine( strlog);
w.WriteLine("__________________________");
w.Flush();
w.Close();
}