ASP.NET页面刷新的实现方法
先看看ASP.NET页面刷新的实现方法:
第一:
C# codeprivate void Button1_Click( object sender, System.EventArgs e )
{
Response.Redirect( Request.Url.ToString( ) );
}
第二:
C# codeprivate void Button2_Click( object sender, System.EventArgs e )
{
Response.Write( " < script language=javascript>window.location.href=document.URL; < /script>" );
}
第三:
C# codeprivate void Button3_Click( object sender, System.EventArgs e )
{
Response.AddHeader( "Refresh","0" );
}
第四:
C# codeprivate void Button6_Click( object sender, System.EventArgs e )
{
//好像有些不对?
//Response.Write( " < script language=javascript>window.location.reload( ); < /script>" ); }
第五:
HTML code< 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
相关文档:
In the last post I showed how to use the ASP.NET 3.5 Routing Engine
for URLRewriting purposes. I want to go further in this post by adding
the ability to add variables into a route path and forward and append
query string variables to the destination Web Form request.
A route can contain one or ......
先建个html模版页(template.htm):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>$title</title>
</head>
&l ......
TinyMCE 在Asp.Net中的使用方法其实挺简单的,从官方网站下载TinyMCE),然后将里面的jscripts目录拷到你的网站目录
假设你的aspx页面中某一个地方需要用到编辑器,则加入
<asp:TextBox ID=”brand” TextMode=”MultiLine” runat=”server” />
并同时在header里加入:
<script ......
1. oncontextmenu="window.event.returnvalue=false" 将彻底屏蔽鼠标右键
<table border oncontextmenu=return(false)><td>no</table> 可用于Table
2. <body onselectstart="return false"> 取消选取、防止复制
3. onpaste="return false" 不准粘贴
4. oncopy="return false;" oncut="return f ......
1.//弹出对话框.点击转向指定页面
Response.Write(" <script>window.alert('该会员没有提交申请,请重新提交!')
</script>");
Response.Write(" <script>window.location
='http://www.51aspx.com/bizpulic/upmeb.aspx' </script>");
2.//弹出对话框
Response.Write(" <script lang ......