The main function of the response object in ASP programming is to transfer data to the browser from the browser to the server, we know that the ASP script is executed on the server side, and he does not have the function of output "value". To have the output "value", you must rely on the response object.
Here we will focus on some of the features that are most commonly used. That is, some of the functions that are often used in programming are as follows:
(1). Response.Write Send Message to Browser
(2). Response.End to effectively abort code
(3). Response.Redirect page Redirection
How do I use Response.Write to send information to a browser?
In the following response.asp is a program to send information to the client, in the program using a built-in function--dateadd, for this feature can refer to the following related documents:
Http://help.activeserverpages.com/iishelp/VBScript/htm/vbs90.htm.
Response.asp Program Source code:
<html>
<head>
<title> response.asp </title>
<body color = "#FFFFFF" >
<p>
<%when = now ( )tommorow = dateadd ( "d" , 1 , when )twoweekslater = dateadd
( "ww" , 2 , when )fourteenweekdayslater = dateadd ( "w" , 14 , when )monthlater = dateadd ( "m" , 1 , when )sixminuteslater = dateadd ( "n" , 6 , when )sixhourslater = dateadd ( "h" , 6 , when )fortysecslater = dateadd ( "s" , 40 , when )response.write "现在时间:
<b>" & when & "</b> <br>"response.write "明天此时:
<b>" & tommorow & "</b>
<br>"response.write "一月以后此时:
<b> " & monthlater & " </b>
<br>"%>从现在以后6秒钟:<b> <%= sixminuteslater %> </b>
<br> 从现在以后6小时是:<b> <%= sixhourslater %> </b>
<br> 从现在以后40秒是: <b> <%= fortysecslater %> </b>
<br> </body> </html>
The following interfaces are implemented:
Figure 01:response.write Sending information to the browser