ASP 8 Request,response,server

Source: Internet
Author: User

Request member:

1.request.urlreferrer get the source of the request, can be anti-theft chain
2.request.userhostaddress get the IP address of the visitor
3.request.cookies[""];//read Cookies
response.cookies[""];//write Cookies back to the browser
4.request.mappath (""); Converts a virtual path to a physical path on disk

Response member: Buffered output of the response: in order to improve the performance of the server, ASP. NET when write to the browser, the default does not
Each write will be output to the browser immediately, but will cache the data, to the appropriate time or the end of the response will be
The data in the buffer is sent to the browser together.

1.response.buffer; This property is used to control whether a response buffer is used, and the default is true!
2.response.flush () sends the data in the buffer to the browser. This is useful when you need to export the write out to the browser immediately.
3.response.clear () empties the buffer's data. This way the data in the buffer that is not sent to the browser is emptied and will not be sent to the browser.
Encoding of the 4.response.contentencoding output stream
5.response.contenttype the content type of the output stream
6.response.cookies A collection of cookies returned to the browser, which can be used to set cookies
7.response.outputstream output stream, use it when exporting non-textual content such as pictures, Excel files, etc.
8.response.end () Terminates the response, sends the data from the previous cache to the browser, and the code after end () is not executed, and the flush () method is called in the End method.
When terminating some illegal requests, such as hotlinking, you can immediately terminate the request with end ()
9.response.redirect () redirects the browser to the new URL.
10.response.setcookie (HttpCookie cookie) updates the cookie written to the browser into the output stream, and if the cookie is present, the update does not exist.
11.response.write () outputs content to the browser.

The Server Object Server property is an instance of HttpServerUtility that provides access to methods and properties on the server

1.server.mappath get the physical path to the file
2.server.execute (); Server.Transfer () script to execute another page
3.server.htmldecode (); Server.HTMLEncode (); will be steadily encoded into a suitable browser that can be properly browsed
4.server.urldecode; Server.URLEncode URL encoding and decoding

ASP 8 Request,response,server

Related Article

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: 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.