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.
相关文档:
在Asp.Net中写了一个附件上传和下载的程序,附件上传到数据库中,然后将附件的GUID保存起来,我们可以根据GUID来找到数据库中的附件,一般附件下载的代码是:
private void Download(string ID)
{
file = logic.GetA ......
<%@ Page Language="C#" %>
<%@ Import Namespace="System.IO" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
prote ......
#region 1
private void CreateCheckCodeImage()
{
//获取随即字符串
int number;
char code;
string checkCode = String.Empty;
System.Random random1 = new Random();
for (int i = 0; i < 5; i++)
{
number = random1.Next( ......
1.//弹出对话框.点击转向指定页面
Response.Write("<script>window.alert('该会员没有提交申请,请重新提交!')</script>");
Response.Write("<script>window.location ='http://www.cgy.cn/bizpulic/upmeb.aspx'</script>");
2.//弹出对话框
Response.Write("<scr ......