Nederlands English
     
   

 






 What's my IP Address Minimize

On this page you find a small prog to catch your IP address. The code in Visual Basic is also attached.

  
 IFrame Minimize
  
 Links Minimize
  
 CodePrint Minimize
   1:Partial Class _Default
   2:Inherits System.Web.UI.Page
   3: 
   4:'Load on start-up
   5:Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
   6:If Page.IsPostBack = False Then
   7:            IpAddress()
   8:End If
   9:End Sub
  10: 
  11: 
  12:'IP adres by Sappy.nl
  13:Public Sub IpAddress()
  14:Dim strIpAddress As String
  15:        strIpAddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
  16: 
  17:If strIpAddress = "" Then
  18:            strIpAddress = Request.ServerVariables("REMOTE_ADDR")
  19:End If
  20:'Write IP to Label
  21:        Label1.Text = "Your IP is -->" & strIpAddress
  22:End Sub
  23: 
  24:End Class
 HTML 4.01 Code
 ASCII Code
  
 

Get IP address

 
Sappy.nl by Frank van Rooijen, .NET community for developers, friends and programming enthousiasts.
 
website statistics