The methods for response objects in ASP.net are shown in the following table, and the important methods are described in detail below.
WriteFile将文件输出到客户端
Write将数据输出到客户端浏览器
Redirect将网页重新转到另一地址
Flush将缓冲区的数据输出到客户端浏览器
End停止并结束ASP网页的处理
Close关闭客户端的联机
ClearHeaders清除缓冲区中的页面标题
Clear清除缓冲区的数据
BinaryWrite将二进制字符或字符串输出到客户端浏览器
AppendToLog将自定义的数据加入到IIS日志文件中(LogFile),以便追踪与分析记录。
1.Write
Function:
Output data to the client browser.
Format:
Response.Write ("string/variable")
Generally, the Response.Write method is used to output variables and volatile data. Usually abbreviated in a program.
2.Redirect
Function:
Re-turn the page to another URL.
Format:
Response.Redirect ("URL")
· DatePart0 function:
Function: Take out the values of year, month and day
Format: X=datepart ("Y", Z1)
where z represents the incoming date time; Y represents the value of each part of the purpose.
· Now function: reads the current system date and time.
· WeekdayName (n) function
Function: Returns the name of the week.
3.end
Function:
Stops processing the ASP Web page and returns the result to the browser. Tell the browser data has been all downloaded, but also make IIS/PWS no longer read the subsequent HTML markup and ASP programs, and to end the entire ASP file.
Format:
Resdonse.end