文件下載,指定默認名
程序代碼
Response.AddHeader("content-type","application/x-msdownload");
Response.AddHeader("Content-Disposition","attachment;filename=要下載的文件名.rar");
刷新頁面
程序代碼
Response.AddHeader "REFRESH", "60;URL=newpath/newpage.asp"
等同于客戶機端<META>元素:
程序代碼
<META HTTP-EQUIV="REFRESH","60;URL=newpath/newpage.asp">
頁面轉向
程序代碼
Response.Status = "302 Object Moved"
Response.Addheader "Location", "newpath/newpage.asp"
等同于使用Response.Redirect方法:
程序代碼
Response.Redirect "newpath/newpage.asp"
強制瀏覽器顯示一個用戶名/口令對話框
程序代碼
Response.Status= "401 Unauthorized"
Response.Addheader "WWW-Authenticate", "BASIC"
強制瀏覽器顯示一個用戶名/口令對話框,然后使用BASIC驗證把它們發送回服務器(將在本書后續部分看到驗證方法)。
如何讓網頁不緩沖
程序代碼
Response.Expires = 0
Response.ExpiresAbsolute = Now() - 1
Response.Addheader "Response.CacheControl = "no-cache"
新聞熱點
疑難解答