免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項超值服

開通VIP
ASP.NET頁面刷新的實現(xiàn)方法總結(jié)
本文是對ASP.NET頁面刷新的實現(xiàn)方法進(jìn)行了總結(jié),有需要的網(wǎng)友可以收藏了!
第一:
C# code
private void Button1_Click( object sender, System.EventArgs e )
{
  Response.Redirect( Request.Url.ToString( ) );
}
第二:
C# code
private void Button2_Click( object sender, System.EventArgs e )
{
Response.Write( " < script language=javascript>window.location.href=document.URL; < /script>" );
}
第三:
C# code
private void Button3_Click( object sender, System.EventArgs e )
{
Response.AddHeader( "Refresh","0" );
}
第四:
C# code
private 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實現(xiàn)刷新另個框架頁面
在寫asp.net程序的時候,我們經(jīng)常遇到跳轉(zhuǎn)頁面的問題,我們經(jīng)常使用Response.Redirect ,如果客戶要在跳轉(zhuǎn)的時候使用提示,這個就不靈光了,如:
Response.Write(" < script>alert('恭喜您,注冊成功!'); < /script>"); Response.Redirect("main.html"); 這時候我們的提示內(nèi)容沒有出來就跳轉(zhuǎn)了,和Response.Redirect("main.html"); 沒有任何區(qū)別。
這時我們采用下面代碼試驗一下ASP.NET頁面刷新:
Response.Write(" < script language=javascript>alert('恭喜您,注冊成功!') < /script>"); Response.Write(" < script language=javascript>window.location.href='main.html' < /script>"); 這個即實現(xiàn)了我們的要求,在提示后,跳轉(zhuǎn)頁面。
最重要的是window.location.href 語句可以實現(xiàn)一個框架的頁面在執(zhí)行服務(wù)器端代碼后刷新另一個框架的頁面(Response.Redirect無法達(dá)到,至少我沒有發(fā)現(xiàn)):
如:index.htm頁面中有二個框架,分別為 frameLeft和frameRight,在frameRight頁面中執(zhí)行服務(wù)器端代碼后刷新frameLeft中的頁面。
本文來自: IT知道網(wǎng)(http://www.itwis.com) 詳細(xì)出處參考:http://www.itwis.com/html/net/aspnet/20100301/7576.html
本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
當(dāng)點(diǎn)擊按鈕如何在asp.net 2.0中重新加載當(dāng)前的頁面
asp.net 返回上一頁的實現(xiàn)方法小集
asp.net(c#)網(wǎng)頁跳轉(zhuǎn)七種方法小結(jié)
網(wǎng)頁定時刷新
ASP .NET下的301重定向
window.location.href的用法(動態(tài)輸出跳轉(zhuǎn))
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服