Re: Reload Page Command
From: Alan Z. Scharf (ascharf_at_grapevines.com)
Date: 05/13/04
- Next message: Byron: "IsInRole fails when run on a domain controller."
- Previous message: Paul M: "question regarding redirecting through code..."
- In reply to: Steven Cheng[MSFT]: "Re: Reload Page Command"
- Next in thread: Alan Z. Scharf: "Re: Reload Page Command"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 13 May 2004 09:23:31 -0400
Steven,
Thanks again for the detailed example.
I will try it out and let you know how it goes.
Regards,
Alan
"Steven Cheng[MSFT]" <v-schang@online.microsoft.com> wrote in message
news:VeTVhxJOEHA.3564@cpmsftngxa10.phx.gbl...
> 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: Byron: "IsInRole fails when run on a domain controller."
- Previous message: Paul M: "question regarding redirecting through code..."
- In reply to: Steven Cheng[MSFT]: "Re: Reload Page Command"
- Next in thread: Alan Z. Scharf: "Re: Reload Page Command"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|