Originariamente inviato da pietro09
Qualche suggerimento?
forse e' piu' un problema di javascript cmq ho visto in giro una tip che potrebbe esserti utile e ti scrivo qui di seguito
--------------------------
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.
codice:
<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:
codice:
<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:
codice:
private void Page_Load(object sender, System.EventArgs e)
{
Page.RegisterStartupScript("setTimer","<script
language='javascript'>setTimer();</script>");
}
--------------------------