Can you take a look at this code and help me figure out why the alert is not working on the webpage? The console.WriteLine statement below it is running fine, but the alert isn't appearing.
private void PublishLoop()
{
while (Running)
{
Thread.Sleep(5000);
dtMessages = (String)(Cache.Get(key));
if (dtMessages == null)
{
//publish here
dtMessages = LoadMessages();
System.Diagnostics.Debugger.Log(0,null,dtMessages);
Page.ClientScript.RegisterStartupScript(this.GetType(),"ClientScript", "alert('hi');",true);
Console.WriteLine(dtMessages);
}
}
}