15-2 對表??訊???

ANT^ǦܥΤݮɡAq`|bƤeAǰe@ǪYTAoǸTiHΤݪsDpe{Ҧ쪺ơC

UoӽdҡAϥ Response.Redirect Ӷi}G

Example]response/redirect.asp^G

bWzdҤAunϥΪ̥@ӿﶵAY|}}CWzdҪlɦpUG

lɡ]response/redirect.asp^G]ǦϰUYi^
<%@language=JScript%>
<%
x=Request.Form("url")+"";		// নr
if (x!="undefined")		// NIӭsJAѦ}l}
	Response.Redirect(Request.Form("url"));
%>

<%title="Response.Redirect d"%>
<!--#include file="../head.inc"-->
<hr>

п@}ؼСG
<form method=post>
<input type=radio name=url value=http://www.ntu.edu.tw onClick="this.form.submit()">xj<br>
<input type=radio name=url value=http://www.nthu.edu.tw onClick="this.form.submit()">Mj<br>
<input type=radio name=url value=http://www.google.com onClick="this.form.submit()">Google jM<br>
</form>

<hr>
<!--#include file="../foot.inc"-->

SOn`NOGResponse.Redirect ҥ]tTOݩYTAb Response.Buffer = false pUAoǪYTX{beeA_hN|y~C]|ԲӻC^

UoӽdҡAϥ Response.Charset ǰe󪺽sXTG

Example]response/charset.asp^G

WzdҪlɦpUG

lɡ]response/charset.asp^G]ǦϰUYi^
<%@language=JScript%>
<% Response.Charset="x-sjis" %>
<%title="Response.Charset d"%>
<!--#include file="../head.inc"-->
<hr>

<p>This page is encoded in "x-sjis", which is a Japanese character set.
<br>In order to view the following Big5 characters, you need to change the document encoding.
<br>AYݱoo@yANAwgNsX令uc餤 (Big 5)vFI

<hr>
<!--#include file="../foot.inc"-->

bWzdҤAڭ̸g Response.Charset="x-sjis" NsX]wsXAҥHݤ줤C]pGAtΨSwˤrΡAIE ]|߰ݬO_nwˤrΡC^ugѤʱNsX令uc餤 (Big 5)vA~ݪC

AbWzdҤAҥ]tɮ head.inc wgb meta Ҥ charset=big5AѦi IIS A|H ASP {X Response.Charset DAө meta Ҥ]wC

ڭ̤]iHϥ Response AddHeader kӥ[JTAҦpAbUӽdҤAڭ̦bTwqT}A]UCdҷ|bT᪽}MؤjǪApUG

Example]response/addHeader.asp^G

WzdҪlɦpUG

lɡ]response/addHeader.asp^G]ǦϰUYi^
<%@language=JScript%>
<%Response.AddHeader("Refresh", "3; URL=http://www.csie.ntu.edu.tw");%>
<%title="Response.AddHeader d"%>
<!--#include file="../head.inc"-->
<hr>
bT|sxjutI
<hr>
<!--#include file="../foot.inc"-->

bWzdҤAϥ AddHeader ұo쪺ĪGAOMUC HTML <meta> ҩұo쪺}ĪGO@˪G

<meta http-equiv="Refresh" content="3; URL=http://www.cs.nthu.edu.tw">

UoӽdҦCLX Response 󪺦Uөʽ誺w]ȡG

Example]response/listResponse.asp^G

WzdҪlɦpUG

lɡ]response/listResponse.asp^G]ǦϰUYi^
<%@language=jscript%>
<%title="LX Response 󪺦Uةʽ"%>
<!--#include file="../head.inc"-->
<hr>

Response.Buffer = <%=Response.Buffer%><br>
Response.ContentType = <%=Response.ContentType%><br>
Response.Expires = <%=Response.Expires%><br>
Response.ExpiresAbsolute = <%=Response.ExpiresAbsolute%><br>
Response.Status = <%=Response.Status%><br>

<hr>
<!--#include file="../foot.inc"-->

䤤 Response.Status ^ǪAAYOu200 OKvAN@L~CLi઺TάAШUCG
AX ^廡
2xx Success ǰeeFu@p
200 OK; the request was fulfilled. ǰe
201 OK; following a POST command. ǰeAHpost command 榡ǰe
202 OK; accepted for processing, but processing is not completed. ǰeweFA{ǦDALk{ǡC
203 OK; partial information--the returned information is only partial. ǰeweFA]YǦ]u^dzTC
204 OK; no response--request received but no information exists to send back. ǰeweFA]YǦ]Lk^ǸTC
3xx Redirection ij}I
301 Moved--the data requested has a new location and the change is permanent. zҭnD}wä[EC
302 Found--the data requested has a different URL temporarily. zҭnD}ȮɾEC
303 Method--under discussion, a suggestion for the client to try another location. zҭnD}ثeҪijAijzոէO} C
304 Not Modified--the document has not been modified as expected. nǰeƤXWwC
4xx Error seems to be in the client Τݺæ~
400 Bad request--syntax problem in the request or it could not be satisfied. bzrequest ykDAijzץA_hiLkC
401 Unauthorized--the client is not authorized to access data. ΤݥgvALkDZơC
402 Payment required--indicates a charging scheme is in effect. ثe榹BݥIO
403 Forbidden--access not required even with authorization. ثeB(YϳqL{ҥLkq)
404 Not found--server could not find the given resource. ALkM귽
5xx Error seems to be in the server Aݺæ~
500 Internal Error--the server could not fulfill the request because of an unexpected condition. ]W]AALkΤݭnD
501 Not implemented--the sever does not support the facility requested. Aݦb޳NW䴩ΤݭnD
502 Server overloaded--high load (or servicing) in progress. A]ILAثeLkC
503 Gateway timeout--server waited for another service that did not complete in time. A]BzLprocessεݮɶL[ӶWXɶ


JScript {]pPΡGΩAݪ ASP