易截截图软件、单文件、免安装、纯绿色、仅160KB

Asp页面刷新方法(转)

先看看ASP.NET页面刷新的实现方法:
第一:
private void Button1_Click( object sender, System.EventArgs e ) { Response.Redirect( Request.Url.ToString( ) ); } 第二:
private void Button2_Click( object sender, System.EventArgs e ) { Response.Write( " < script language=javascript>window.location.href=document.URL; < /script>" ); } 第三:
private void Button3_Click( object sender, System.EventArgs e ) { Response.AddHeader( "Refresh","0" ); } 第四:
private void Button6_Click( object sender, System.EventArgs e ) { //好像有些不对? //Response.Write( " < script language=javascript>window.location.reload( ); < /script>" ); } 第五:
< script>< !-- var limit="3:00" if ( document.images ) { var parselimit=limit.split( ":" )parselimit=parselimit[0]*60+parselimit[1]*1 } function beginrefresh( ) { if ( !document.images )returnif ( parselimit==1 )window.location.reload( )else { parselimit-=1curmin=Math.floor( parselimit/60 )cursec=parselimit%60if ( curmin!=0 )curtime=curmin+"分"+cursec+"秒后重刷本页!"elsecurtime=cursec+"秒后重刷本页!"window.status=curtimesetTimeout( "beginrefresh( )",1000 ) } } window.onload=beginrefresh//--> < /script>< DIV style="Z-INDEX: 102; LEFT: 408px; POSITION: absolute; TOP: 232px" ms_positioning="text2D"> < P>< FONT size="3">自动刷新页面< /FONT>< /P> < /DIV> 第六:
< meta http-equiv="refresh" content="300; url=target.html"> 用window.location.href实现刷新另个框架页面
在写asp.net程序的时候,我们经常遇到跳转页面的问题,我们经常使用Response.Redirect ,如果客户要在跳转的时候使用提示,这个就不灵光了,如:
Response.Write("< script>alert('恭喜您,注册成功!'); < /script>"); Response.Redirect("main.html"); 这时候我们的提示内容没有出来就跳转了,和Response.Redirect("main.html"); 没有任何区别。
这时我们采用下面代码试验一下ASP.NET页面刷新:
Response.Write("< script language=javascript>alert('恭喜您,注册成功!')< /script>"); Response.Write("<


相关文档:

ASP 多图片上传

1:上传页面
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!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>
<meta http-equiv="Content-Type" content="te ......

asp 文字循环滚动(up)

<div id="storyScroller" style="width:100%;height:140px;line-height:28px;overflow:hidden;">
 <div id="storyScrollMid">
  <ul id="storyScrollUl" style=" list-style-type:circle; list-style-position: outside; margin-left:18px; margin-right:0px">
<li>item01</l ......

asp 取得反日期

<%
function dt(v)
dim dy
dy=31
Marr=array(4,6,9,11)
yyyy=Year(Date())
mm=Month(Date())
dd=Day(Date())
if mm=2 then
 if yyyy mod 400 or (yyyy mod 4=0 and yyyy mod v0=0) then
  dy=29 
 else
  dy=28
 end if 
else 
 for i=0 to 3
......

asp编写过程

编写过程
过程是一组能执行指定任务且具有返回值的脚本命令。您可以定义自己的过程,然后在脚本中反复调用它们。
您可以将过程定义放在调用过程的 .asp 文件中,也可以将通用过程放在一个共享的 .asp 文件中,然后用 SSI #include 指令将其包含进其他调用其过程的 .asp 文件中。您还可选择另一种方法,即把这些功能打包 ......

ASP 编程中 20 个非常有用的例子

1.如何用Asp判断你的网站的虚拟物理路径
答:使用Mappath方法
< p align="center" >< font size="4" face="Arial" >< b >
The Physical path to this virtual website is:
< /b >< /font >
< font color="#FF0000" size="6" face="Arial" >
< %= Server.MapPath("\")% >
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号