ASPX autorefresh

27/07/2004 - 17:22 por javi | Informe spam
Cómo puedo en asp.net crear una página con un timer que se
refresque c/10 segundos, y que c/10 segundos ejecute un
método cualquiera???

alguien tiene algún link con código???

gracias!!

Preguntas similare

Leer las respuestas

#1 Sergio Florez M.
27/07/2004 - 17:41 | Informe spam
<META http-equiv="REFRESH" content="10; url=http://TuUrl.aspx">

Con estos se refresca cada 10 segundos.

Sergio Florez M.
Miembro activo www.AlianzaDev.net
El que persevera insiste
Medellín, Colombia


"javi" escribió en el mensaje
news:4fe101c473ed$7aee7db0$
Cómo puedo en asp.net crear una página con un timer que se
refresque c/10 segundos, y que c/10 segundos ejecute un
método cualquiera???

alguien tiene algún link con código???

gracias!!
Respuesta Responder a este mensaje
#2 Franco Figún
28/07/2004 - 02:13 | Informe spam
Yo te aconsejo usar el siguiente script, que a diferencia del META, te
refresca verdaderamente la pagina:

<%@ OutputCache Duration="1" VaryByParam="none" %>

<script language="JavaScript">
var countDownInterval;
var c_reloadwidth 0
</script>

<ilayer id="c_reload" width=&{c_reloadwidth}; ><layer id="c_reload2"
width=&{c_reloadwidth}; left=0 top=0></layer></ilayer>
<script>
var countDownTime=countDownInterval+1;
function countDown(){
countDownTime--;
if (countDownTime <=0){
countDownTime=countDownInterval;
clearTimeout(counter)
window.location.reload()
return
}
if (document.all) //if IE 4+
document.all.countDownText.innerText = countDownTime+" ";
else if (document.getElementById) //else if NS6+
document.getElementById("countDownText").innerHTML=countDownTime+" "
else if (document.layers){
document.c_reload.document.c_reload2.document.write('Próxima <a
href="javascript:window.location.reload()">actualización</a> en <b
id="countDownText">'+countDownTime+' </b> segundos')
document.c_reload.document.c_reload2.document.close()
}
counter=setTimeout("countDown()", 1000);
}

function startit(){
if (document.all||document.getElementById)
document.write('Próxima <a
href="javascript:window.location.reload()">actualización</a> en <b
id="countDownText">'+countDownTime+' </b> segundos')
countDown()
}

if (document.all||document.getElementById)
startit()
else
window.onload=startit
</script>

FF
www.francofigun.com.ar
www.microsofties.com.ar
Yahoo MSN:
"javi" wrote in message
news:4fe101c473ed$7aee7db0$
Cómo puedo en asp.net crear una página con un timer que se
refresque c/10 segundos, y que c/10 segundos ejecute un
método cualquiera???

alguien tiene algún link con código???

gracias!!
email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaRespuesta Tengo una respuesta
Search Busqueda sugerida