Asp. The method of response object in net

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.