Context. response.charset;//Gets or sets the HTTP character set of the output stream
context. response.contenttype;//Gets or sets the HTTP MIME type of the output stream
context. response.cookies;//Gets the response Cookie collection
context. response.end;//terminates execution of the Httphamdler
context. response.expires;//Gets or sets the number of minutes before the cached page expires in the browser
context. Response.headers;//gets the collection of response headers
context. response.isclientconnected;//gets a value that indicates whether the client is still connected to the
context on the server. The response.output;//enables text output to the output HTTP response stream
context. response.redirect;//redirects the request to the new URL and specifies the new URL
context. response.redirectlocation;//Gets or sets the value of the Http location header
Context. response.setcookie;//updates an existing cookie in the collection of cookies
context. The response.status;//setting returns to the Status bar of the client
context. response.statuscode;//Gets or sets the HTTP status code
context for the output returned to the client. response.statusdescription;//Gets or sets the HTTP status string
context for the output returned to the client. response.substatuscode;//Gets or sets the value of a qualified response status Code
context. response.suppresscontent;//Gets or sets a value that indicates whether HTTP content is sent to the client
context. response.write;//writes a string or other type to the HTTP response output stream
context. response.writefile;//writes the specified file directly to the HTTP response output stream
Context. Response.End ();//Terminate Httphamdler execution, this sentence is written in a method, call this method after the code is no longer executed downward, commonly used in a method, pay attention to the difference between return, return just terminate a method;
In this way, you can catch exceptions.
Try
{
Context. Response.End ();
}
catch (Exception ex)
{
}
Because the exception processing efficiency is low, so can do without response.end ();
Asp. NET core object of HttpResponse