文谷首页 | 业界传真 | 网络技术 | 服务器 | 数据库 | 存储技术 | 系统安全 | 无线技术 | Cisco | .Net | Windows | Linux | Unix | Java
电子商务 | 网站工程 | 网页设计 | 平面设计 | 多媒体 | 编程语言 | Oracle | MSSQL | Photoshop | ASP | PHP | 实用技巧 | 进程查询 | 文谷论坛
ASP频道
没有任何子栏目
您现在的位置: IT文谷 >> 网站工程 >> 网页编程 >> ASP >> 文章正文
用HTML META标签和ASP来作定时迟时信息用HTML META标签和ASP来作定时迟时信息2006-4-10 22:53:25用HTML META标签和ASP来作定时迟时信息2006-4-10 22:53:25用HTML META标签和ASP来作定时迟时信息
用HTML META标签和ASP来作定时迟时信息
用HTML META标签和ASP来作定时迟时信息用HTML META标签和ASP来作定时迟时信息2006-4-10 22:53:25用HTML META标签和ASP来作定时迟时信息2006-4-10 22:53:25用HTML META标签和ASP来作定时迟时信息
用HTML META标签和ASP来作定时迟时信息用HTML META标签和ASP来作定时迟时信息2006-4-10 22:53:25用HTML META标签和ASP来作定时迟时信息2006-4-10 22:53:25用HTML META标签和ASP来作定时迟时信息


Using ASP and HTML Meta TAGS To Make A Dynamic Delay Message

This is a little trick to display a timed message to the user after doing some sort of task. By mixing
some creative ASP with a simple HTML META Refresh you can display a message to a user for a specified
period of time and then redirect them back to wherever you want.

META tags with an HTTP-EQUIV attribute are equivalent to HTTP headers. Usually, they control the action of
browsers, and may be used to refine the information provided by the actual headers.

Here is how it works.

After completing some sort of ASP code. ( Possibly a database update ).

You can redirect the user like so to the delay page.

First, turn on buffering because you'll probably need it depending on where in your page you redirect.

Put this at the top of your page before the <HTML> Tag.
<% Response.Buffer = True %>

Then when you are ready to send the user to the delay page do something like this.

<% MYMESSAGE = Server.URLEncode("Adding New Product....Please Wait") %>
<% Response.Redirect ("delay.asp?DELAY_TIME=3&DELAY_MESSAGE=" & MYMESSAGE & "&REDIRECT_URL=default.asp") %>
As you see can see there are 3 variables we send to the delay page.

DELAY_TIME
REDIRECT_URL
DELAY_MESSAGE

Then the delay.asp page would consist of the following code.

<%@ LANGUAGE="VBSCRIPT" %>
<%
DELAY_TIME = Request("DELAY_TIME")
REDIRECT_URL = Request("REDIRECT_URL")
DELAY_MESSAGE = Request("DELAY_MESSAGE")
%>
<html>

<head>
<meta http-equiv="Refresh" content="<% =DELAY_TIME %>; URL=<% =REDIRECT_URL %>">
<title>Delay</title>
</head>

<body color="#FFFFFF">

<font face="Arial"><p align = "center"><strong><% =DELAY_MESSAGE %></strong></p></font>

</body>
</html>

用HTML META标签和ASP来作定时迟时信息用HTML META标签和ASP来作定时迟时信息2006-4-10 22:53:25用HTML META标签和ASP来作定时迟时信息2006-4-10 22:53:25用HTML META标签和ASP来作定时迟时信息
  • 上一篇文章:

  • 下一篇文章:
  • 进入论坛讨论

    相关文章
    Request.ServerVariables的值与防盗链
    ASP正则表达式详解
    ASP.NET的ACCESS数据库操作类
    ASP.NET中的窗体身份验证
    ASP.NET中的Windows身份验证
    将Asp.net页面输出为HTML
    log4net配置成可log到ms sql
    解决ASP.NET网页出现的乱码问题
    技术应用-asp.net加密方法
    ASP.NET 中字符的格式化输出
    .NET中获取电脑名、IP及用户名方法
    ASP.NET数据库编程之处理文件访问许可
    热门文章最新推荐

    版权与免责声明:
    ① 本网转载其他媒体稿件是为传播更多的信息,此类稿件不代表本网观点,版权归原作者所有,本网不承担此类稿件侵权行为的连带责任。
    ② 本站原创文章,转载时请注明出自文谷及作者姓名
    ③在本网BBS上发表言论者,文责自负。
    ④如您因版权等问题需要与本网联络,请在30日内联系 。
    用HTML META标签和ASP来作定时迟时信息用HTML META标签和ASP来作定时迟时信息2006-4-10 22:53:25用HTML META标签和ASP来作定时迟时信息2006-4-10 22:53:25用HTML META标签和ASP来作定时迟时信息
    用HTML META标签和ASP来作定时迟时信息用HTML META标签和ASP来作定时迟时信息2006-4-10 22:53:25用HTML META标签和ASP来作定时迟时信息2006-4-10 22:53:25用HTML META标签和ASP来作定时迟时信息

    全站热点
    最新推荐
    关于文谷 | 联系文谷 | 免责声明 | 文谷论坛
    Tel: 0577-65690019      E-mail: ichenjian@gmail.com    MSN:ichenjian@hotmail.com    QQ:2911194
    Copyright © 2004-2008 wengu.com 文谷 All Rights Reserved
    浙ICP备05000327号