后台刷新aspx頁面的方式及獲取系統當前時間


一:Response.Redirect(Request.Url.ToString());

二:Response.Write("<script language=javascript>window.location.href=document.URL;</script>");

三:Response.AddHeader("Refresh","0");

四:Response.Write("<script language=javascript>window.location.reload();</script>");

五:Response.Write("<script>opener.location.href=opener.location.href;</script>");//(刷新父頁面)

 

 


獲取當前時間
string nowTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM