ASP.Net/Request/Visitor Info

Материал из .Net Framework эксперт
Версия от 11:53, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Request.UserHostAddress (VB.net)

<%@ 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>



Request.UserHostName (VB.net)

<%@ 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>



Request.UserLanguages (VB.net)

<%@ 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>