Hope this will sort ur problem...
cretae a warning.aspx page and put ur warning message and Ok button there..
and create a global js file and place the below code inside it.
function Timeout()
{
window.setTimeout(DisplayWarning,90000-12000)
}
function DisplayWarning()
{
var newwindow =window.open( "warning.aspx", "WarningTitle", "channelmode=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=330,height=220", true);
newwindow.focus();
Timeout();
}
Import this js on every page..and call Timeout() function on onload like ..<body onload="Timeout();">...here u can think of a better solution like calling the timeout function from one common place ..ex.having some parent class
In warning.aspx page add below code
function CloseWindow()
{
var bclicked = "<%=bclicked%>";
if(bclicked == "True" || bclicked == "true" )
{
window.close();
}
}
Call this CloseWindow() function on onload like
<body onload="CloseWindow();">
and In code behind the code shud be..
public bool bclicked = false;
protected void Page_Load(object sender, EventArgs e)
{
bclicked = false;
}
protected void Button1_Click(object sender, EventArgs e)
{
bclicked = true;
}