Displaying the HTTP headers collection in ASP.NET with for loop : HTTP Header « Request « ASP.Net






Displaying the HTTP headers collection in ASP.NET with for loop

<%@ Page Language="vb" %>
<html>
   <head>
      <title>Displaying the HTTP headers collection in ASP.NET</title>
   </head>
<body>

<p>

<%
Dim HostAddress, HostName, Languages() As String
Dim iCounter As Integer

HostAddress = Request.UserHostAddress
HostName = Request.UserHostName
Languages = Request.UserLanguages

Response.Write("Client IP Address: " & HostAddress & "<br>")
Response.Write("Client Machine Name: " & HostName & "<br>")
For iCounter = 0 To Languages.GetUpperBound(0)
   Response.Write("Client Language " & iCounter & ": " & CStr(Languages(iCounter)) & "<br>")
Next iCounter
%>

</p>

</body>
</html>
           
       








Related examples in the same category

1.Showing HTTP Headers via the Headers Collection in ASP.NET
2.Displaying the HTTP headers collection in ASP.NET with 'select case statement'
3.Output HTTP Header (VB.net)