RESPONSE对象第二局部――BUFFER掌握
Response object error 'ASP 0156 : 80004005'
Header Error
whatever.asp, line #
The HTTP headers are already written to the client browser.
Any HTTP header modifications must be made before writing page content.
如许的毛病信息是不是也一样困扰过你?
不外只需你把"<%response.buffer=true%>”这一行加在任何一页夹杂着REDIRECTS和
网页内容的网页的第一行,你就不会再看到如许的毛病了!这一行会消除阅读器收回:
"HEADERS ARE ALREADY SENT”信息。
<%response.buffer=true%>次要是告知阅读器在一下事务产生之前不要写入任何器材:
a) response.end履行前
b) response.flush履行前
c) 以后页的一切办事器剧本处置终了之前
d) response.redirect号令已被发送,而且没有任何内容经由过程response.flush被发送之前。
<%response.buffer=true%>
<html><head>
<title>formjumprespond.asp</title>&
<body bgcolor="#FFFFFF">
<%
' My ASP program that redirects to URL
thisURL="http://www.joyeasy.net/"
where=Request.QueryString("Wheretogo")
Select Case where
case "main"
response.redirect thisURL & "/"
case "samples"
response.redirect thisURL & "/aspsamp/samples/samples.htm"
case "docs"
response.redirect thisURL & "/iasdocs/aspdocs/roadmap.asp"
case "news"
response.redirect "http://www.sina.com"
case "fun"
response.redirect "http://www.nease.com"
End Select
response.write "All dressed up and I don't know where to go<br>"
response.write "I recommend --> " & "<br>"
response.write server.htmlencode(thisURL & "/learn/test/res2.asp?where=fun") & "<br>"
response.write "for a good laugh!" & "<P>"
%>
</body></html>
======================================================================转贴-若何使用ASP完成邮箱会见(2000.03.21)