Response.Write(
"
<META HTTP-EQUIV='Refresh' CONTENT='5;URL=default.aspx'>
"
);
两种较常用的方法:
1.在 <head> </head> 标签里头添加:
(5:表示5秒钟刷新;url:表示要跳转到的页面名称(例如newPage.html))
<
META
HTTP-EQUIV
='Refresh'
CONTENT
='5;URL=newPage.html'
>
2.用JS:
在 <head> </head> 标签里头添加如下JS:
<
script
>
window.onload = function ()
{
setInterval("redirect();",3000);
}
function redirect()
{
window.location.href="new.aspx";
}
< / script>
window.onload = function ()
{
setInterval("redirect();",3000);
}
function redirect()
{
window.location.href="new.aspx";
}
< / script>
又有
<
script language
=
'
javascript
'
>
window.location.replace(URL);
</
script
>
3.
setTimeout(redirect(),3000);
private void redirect()
{
Page.Response.Redirect("yourURL");
}