Re: Reload Page Command
From: Steven Cheng[MSFT] (v-schang_at_online.microsoft.com)
Date: 05/13/04
- Next message: Natty Gur: "Re: Permission"
- Previous message: mahsa: "calculate distance"
- In reply to: Alan Z. Scharf: "Re: Reload Page Command"
- Next in thread: Alan Z. Scharf: "Re: Reload Page Command"
- Reply: Alan Z. Scharf: "Re: Reload Page Command"
- Reply: Alan Z. Scharf: "Re: Reload Page Command"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 13 May 2004 03:42:49 GMT
Hi Alan,
Thanks for the followup. To answer your question:
1. I have no idea how to control the http-equiv = "refresh" meta of the
page
2. Of course ,we can use javascript code to post a page after a certain
period of time. The
window.setTimeout function is just for such function. For example:
We define the following function "setTimer()" and in it we add the
window.setTimeout("document.forms[0].submit()",1000);
which indicate that the page will be submit 1 second later after we call
this function.
<script language="javascript">
function setTimer()
{
window.setTimeout("document.forms[0].submit()",1000);
}
</script>
Then, we can call this function at the page's clientside's onload event,
just like:
<body onload="setTimer()" >
And if we want to control whether to call it or not at serverside. We can
use
Page.RegisterStartupScript method to programmatically add this script call,
just as below:
private void Page_Load(object sender, System.EventArgs e)
{
Page.RegisterStartupScript("setTimer","<script
language='javascript'>setTimer();</script>");
}
Hope this helps. Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
- Next message: Natty Gur: "Re: Permission"
- Previous message: mahsa: "calculate distance"
- In reply to: Alan Z. Scharf: "Re: Reload Page Command"
- Next in thread: Alan Z. Scharf: "Re: Reload Page Command"
- Reply: Alan Z. Scharf: "Re: Reload Page Command"
- Reply: Alan Z. Scharf: "Re: Reload Page Command"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|