它告诉浏览器不到写任何内容,直到: a) response.end 中止页面操作 b) response.flush 开始执行 c) 100% of the page is executed 页面操作完全执行完 d) response.redirect命令已发出,response.flush不再传送任何内容或文本。
<%response.buffer=false%> <html><head> <title>dailystuff.asp</title> </head> <body> <% whatweekday=Weekday(now()) select case whatweekday case vbSunday response.redirect "http://www.cnn.com" case vbMonday response.redirect "http://www.activeserverpages.com" case vbTuesday response.redirect "http://www.aspalliance.com" case vbWednesday response.redirect "http://www.aspconvention.com" case vbThursday response.redirect "http://www.aspmagazine.com" case vbFriday response.redirect "http://www.dilbert.com" case vbSaturday response.redirect "http://www.movielink.com" end select %> </body> </html>
下面是修改后的代码,执行时不会出现出错信息。
<%response.buffer=true%> <html><head> <title>dailystuff.asp</title> </head> <body> <% whatweekday=Weekday(now()) select case whatweekday case vbSunday response.redirect "http://www.cnn.com" case vbMonday response.redirect "http://www.activeserverpages.com" case vbTuesday response.redirect "http://www.aspalliance.com" case vbWednesday response.redirect "http://www.aspconvention.com" case vbThursday response.redirect "http://www.aspmagazine.com" case vbFriday response.redirect "http://www.dilbert.com" case vbSaturday response.redirect "http://www.movielink.com" end select %> </body> </html>