My.Response Object
Gets the HttpResponse object associated with the Page. This object allows you to send HTTP response data to a client and contains information about that response.
Remarks
The My.Response
object contains the current HttpResponse object associated with the page.
The My.Response
object is only available for ASP.NET applications.
Example
The following example gets the header collection from the My.Request
object and uses the My.Response
object to write it to the ASP.NET page.
<script runat="server">
Public Sub ShowHeaders()
' Load the header collection from the Request object.
Dim coll As System.Collections.Specialized.NameValueCollection
coll = My.Request.Headers
' Put the names of all keys into a string array.
For Each key As String In coll.AllKeys
My.Response.Write("Key: " & key & "<br>")
' Get all values under this key.
For Each value As String In coll.GetValues(key)
My.Response.Write("Value: " & _
Server.HtmlEncode(value) & "<br>")
Next
Next
End Sub
</script>
See also
Cộng tác với chúng tôi trên GitHub
Bạn có thể tìm thấy nguồn cho nội dung này trên GitHub, nơi bạn cũng có thể tạo và xem lại các vấn đề và yêu cầu kéo. Để biết thêm thông tin, hãy xem hướng dẫn dành cho người đóng góp của chúng tôi.
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho