ASP.Net/Request/IP

Материал из .Net Framework эксперт
Перейти к: навигация, поиск

Your IP address (VB.net)

<%@ Page Language=VB Debug=true %>
<script runat=server>
Sub Page_Load(ByVal Sender as Object, ByVal E as EventArgs)
    lblMessage.Text = "Your IP Address: " _
        & Request.UserHostAddress & "<BR>" _
        & "Your Host Name: " _
        & Request.UserHostName & "<BR>"  
End Sub
</SCRIPT>
<HTML>
<HEAD>
<TITLE>Host and IP Address</TITLE>
</HEAD>
<form runat="server">
<asp:label 
    id="lblMessage" 
    font-size="12pt"
    font-name="Tahoma"
    runat="server"
/>
</form>
</BODY>
</HTML>