ASP.Net/Request/Visitor Info — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 15:30, 26 мая 2010
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>