Latest web development tutorials

immobili ASP Buffer

Risposta Object Reference Risposta completa Object Reference

attributo Buffer specifica se l'uscita è tamponata. Normalmente, script ASP viene eseguito sul server, ogni frase di risultati di esecuzione vengono inviati da visualizzare nel browser client. Quando il buffer di uscita è impostata, il server impedisce una risposta al browser fino a quando tutti gli script del server sono stati elaborati, o fino a quando lo script chiama il metodo Flush o End.

Nota: Se si imposta questa proprietà, dovrebbe venire prima che il file ASP <html> tag.

grammatica

response.Buffer[=flag]

参数 描述
flag 布尔值,规定是否缓冲页面输出。

False 指示不缓存,服务器会一边处理一边发送输出。IIS version 4.0 默认为 False,而 IIS version 5.0 及更高的版本默认为 True。

True 指示缓冲。服务器不会发送输出,直到页面上的所有脚本被处理,或者直到 Flush 或 End 方法被调用。

Esempi

esempio 1

In questo esempio, prima della fine del ciclo non verrà inviato dall'uscita browser. Se il buffer è impostata su False, poi una volta per ciclo alla linea di uscita del browser.

<%response.Buffer=true%>
<html>
<body>
<%
for i=1 to 100
response.write(i & "<br>")
next
%>
</body>
</html>

esempio 2

<%response.Buffer=true%>
<html>
<body>
<p>I write some text, but I will control when
the text will be sent to the browser.</p>
<p>The text is not sent yet. I hold it back!</p>
<p>OK, let it go!</p>
<%response.Flush%>
</body>
</html>

esempio 3

<%response.Buffer=true%>
<html>
<body>
<p>This is some text I want to send to the user.</p>
<p>No, I changed my mind. I want to clear the text.</p>
<%response.Clear%>
</body>
</html>


Risposta Object Reference Risposta completa Object Reference