当前位置: 首页 > 图文教程 > 网络编程 > ASP.NET > asp.net 页面延时五秒,跳转到另外的页面

ASP.NET
如何使用vb6.0来实现中文实名搜索
C#实现Window管道技术
记录下一些关于测试工具NUNIT的链接资料,有兴趣的朋友也可以跳过去看看
编写与.NET属性窗口交互的RAD组件(自序)
asp.net 关于form认证的一般设置:
编写与.NET属性窗口交互的RAD组件(一)
ActiveX控件的打包发布[无证书发布](一)
Visual SourceSafe 6.0 的问题思考
VB报表输出的问题,恳请不吝赐教
证书和签名--试用微软提供的证书测试工具系列
[dotNET]如何利用ConfigurationSettings.AppSettings.GetValues读取配置文件中多个...
使用C#编写DES加密程序的framework
令你的网页速度大大提高
怎样得到一个系统盘的全名,不是字符,是全名,如:本地磁盘(C:)?
r在richtextbox中插入动画/控件
Code: Writing Text to a File (Visual Basic)
算法讨论:哲学家就餐问题
我们所要关注的是什么?
firebird 连接嵌入式版本
从Csharp走到VB.Net(一):MyClass保留字

ASP.NET 中的 asp.net 页面延时五秒,跳转到另外的页面


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2010-01-10   浏览: 87 ::
收藏到网摘: n/a

asp.net 页面延时五秒,跳转到另外的页面的实现代码。 --前台
复制代码 代码如下:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Successed.aspx.cs" Inherits="Biz_Order_Successed" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div style="height: 100px">
</div>
<div align="center">
<asp:Label ID="lbmessage" runat="server" Font-Size="Large" Font-Bold="true"></asp:Label>
<br />
<br />
<font size="4" >
系统将会在五秒钟后转向浏览页面
</font>
<br />
<br />
<font color="blue" size="4" ><a id="hrefUrl" href="" style="text-decoration: underline" runat="server"></a></font>
</div>
</form>
</body>
</html>

--后台
复制代码 代码如下:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using HyiSoft.WebUtility;
public partial class Biz_Order_Successed : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string message = string.Empty;
string url = string.Empty;
url = Utility.Request("url");
message = Utility.Request("message");
lbmessage.Text = message;
hrefUrl.HRef = url;
hrefUrl.InnerText = "手动转向页面";
string strRedirectPage = url;
string strRedirectTime = "5";
string strRedirect = string.Format("{0};url={1}", strRedirectTime, strRedirectPage);
Response.AddHeader("refresh", strRedirect);
}
}