Home > Article > Backend Development > Share the Response object tutorial of Asp.Net built-in objects
ResponseObject
The Respose object is used to send data back to the browser from the server. It allows data to be sent to the browser as a result of the request and provides light response information. It can be used to enter data in the page, jump in the page, and also pass parameters of each page. It corresponds to the HTTP protocol. The message corresponds.
Commonly used attributes of Response objects
Attributes | |
Buffer | Gets or sets a value indicating whether to buffer the output and send it after finishing processing the entire response |
Cache | Get the caching policy of the Web page, such as expiration time and confidentiality. . . . |
Charset | Set or get HTTP outputStringEncoding |
Expires | Gets or sets the number of minutes before a page cached on the browser expires |
Cookies | Get the cookie collection of the current request |
IsClientConnected | Return whether the client is still connected to the Server |
SuppressContent | Set whether to send HTTP content to the client browser. If it is true, the web page will not be sent to the client |
Common methods of Response object
Method | |
AddHeader | Add an HTTP header to the output stream |
endToLog | Add custom log information to the IIS log file|
Clear | Clear the contents of the buffer|
Relationship after sending all the contents in the current buffer to the client | |
Flush | Send all data in the buffer to the client|
direct | Redirect the web page to another address|
Output data to the client | |
File | Output the specified file Write HTTP content output stream
The above is the detailed content of Share the Response object tutorial of Asp.Net built-in objects. For more information, please follow other related articles on the PHP Chinese website!