日韩天天综合网_野战两个奶头被亲到高潮_亚洲日韩欧美精品综合_av女人天堂污污污_视频一区**字幕无弹窗_国产亚洲欧美小视频_国内性爱精品在线免费视频_国产一级电影在线播放_日韩欧美内地福利_亚洲一二三不卡片区

ASP基礎(chǔ)教程之實(shí)例學(xué)習(xí)ASP Response 對(duì)象_ASP教程

編輯Tag賺U幣
教程Tag:暫無(wú)Tag,歡迎添加,賺取U幣!

推薦:ASP 3.0高級(jí)編程(四十三)
9.3.5 數(shù)據(jù)高速緩存 首先需要注意的是,數(shù)據(jù)高速緩存與記錄集高速緩存雖然都用于改善性能,但兩者是無(wú)關(guān)的。數(shù)據(jù)高速緩存是臨時(shí)的數(shù)據(jù)存儲(chǔ)區(qū),允許使用高速緩存中的數(shù)據(jù),而不是重新生成新的數(shù)

ASP Response 對(duì)象用于從服務(wù)器向用戶發(fā)送輸出的結(jié)果。

實(shí)例

使用ASP寫文本

本例演示如何使用ASP來(lái)寫文本。

以下為引用的內(nèi)容:
<html>
<body>
<%
response.write("Hello World!")
%>
</body>
</html>

在ASP中使用HTML標(biāo)簽格式化文本

本例演示如何使用ASP將文本和HTML標(biāo)簽結(jié)合起來(lái)。

以下為引用的內(nèi)容:
<html>
<body>
<%
response.write("<h2>You can use HTML tags to format the text!</h2>")
%>
<%
response.write("<p style='color:#0000ff'>This text is styled with the style attribute!</p>")
%>
</body>
</html>

將用戶重定向至不同的URL

本例演示如何將用戶重定向至另一個(gè)的URL。

以下為引用的內(nèi)容:

<%
if Request.Form("select")<>"" then
Response.Redirect(Request.Form("select"))
end if
%>
<html>
<body>
<form action="/example/aspe/demo_aspe_redirect.asp" method="post">
<input type="radio" name="select"
value="/example/aspe/demo_aspe_server.asp">
Server Example<br>
<input type="radio" name="select"
value="/example/aspe/demo_aspe_text.asp">
Text Example<br><br>
<input type="submit" value="Go!">
</form>
</body>
</html>

顯示隨機(jī)的鏈接

本例演示一個(gè)超級(jí)鏈接,當(dāng)您每次載入頁(yè)面時(shí),它將顯示兩個(gè)鏈接中的其中一個(gè)。

以下為引用的內(nèi)容:

<html>
<body>
<%
randomize()
r=rnd()
if r>0.5 then
response.write("<a >mb5u.com</a>")
else
response.write("<a href='http://hl5o.cn'>hl5o.cn</a>")
end if
%>
<p>
This example demonstrates a link, each time you load the page, it will display
one of two links: mb5u.com! OR hl5o.cn! There is a 50% chance for
each of them.
</p>
</body>
</html>

控制緩存

本例演示如何控制緩存。

以下為引用的內(nèi)容:

<%
Response.Buffer=true
%>
<html>
<body>
<p>
This text will be sent to your browser when my response buffer is flushed.
</p>
<%
Response.Flush
%>
</body>
</html>

清空緩存

本例演示如何清空緩存。

以下為引用的內(nèi)容:
<%
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>

在處理過(guò)程中終止腳本并返回結(jié)果

本例演示如何在處理過(guò)程中中斷腳本的運(yùn)行。

以下為引用的內(nèi)容:
<html>
<body>
<p>I am writing some text. This text will never be<br>
<%
Response.End
%>
finished! It's too late to write more!</p>
</body>
</html>

設(shè)置在頁(yè)面失效前把頁(yè)面在瀏覽器中緩存多少分鐘

本例演示如何規(guī)定頁(yè)面在失效前在瀏覽器中的緩存時(shí)間。

以下為引用的內(nèi)容:
<%Response.Expires=-1%>
<html>
<body>
<p>This page will be refreshed with each access!</p>
</body>
</html>

設(shè)置頁(yè)面緩存在瀏覽器中的失效日期或時(shí)間

本例演示如何規(guī)定頁(yè)面在瀏覽器中的緩存時(shí)間日期或時(shí)間

以下為引用的內(nèi)容:
<%
Response.ExpiresAbsolute=#May 05,2001 05:30:30#
%>
<html>
<body>
<p>This page will expire on May 05, 2001 05:30:30!</p>
</body>
</html>

檢查用戶是否仍然與服務(wù)器相連

本例演示如何檢查用戶是否已與服務(wù)器斷開(kāi)。

以下為引用的內(nèi)容:
<html>
<body>
<%
If Response.IsClientConnected=true then
Response.Write("The user is still connected!")
else
Response.Write("The user is not connected!")
end if
%>
</body>
</html>

設(shè)置內(nèi)容類型

本例演示如何規(guī)定內(nèi)容的類型。

以下為引用的內(nèi)容:
<%
Response.ContentType="text/html"
%>
<html>
<body>
<p>This is some text</p>
</body>
</html>

設(shè)置字符集

本例演示如何規(guī)定字符集的名稱。

以下為引用的內(nèi)容:
<%
Response.Charset="ISO8859-1"
%>
<html>
<body>
<p>This is some text</p>
</body>
</html>

Response 對(duì)象

ASP Response 對(duì)象用于從服務(wù)器向用戶發(fā)送輸出的結(jié)果。它的集、屬性和方法如下:

分享:用好ASP.NET 2.0的URL映射
簡(jiǎn)介: URL映射是ASP.NET 2.0中提供的新特性。URL映射技術(shù)幫助我們將一個(gè)特定URL映射為另一個(gè)URL。為了幫助理解,我們假設(shè)你在站點(diǎn)有一個(gè)叫Homepage.aspx的頁(yè)面來(lái)訪問(wèn)主頁(yè),所有的用戶也都用

來(lái)源:模板無(wú)憂//所屬分類:ASP教程/更新時(shí)間:2008-08-22
相關(guān)ASP教程