title: Use ASP.net 2010 B to Ping an IP Address
body: <p>I'm trying to use a simple Ping technique to ping an IP Address. I have added <code>Imports System.Net.NetworkInformation.Ping</code> to my web page and tried to simply create a button that once clicked ping an IP address.</p>
  
  <p>The problem that I have is an error message that states <code>'System.Net.NetworkInformation' is a namespace and cannot be used as an expression.</code></p>
  
  <p>I'm new to this and have tried to replace this with something else, but I still cannot seem to get this to work.  Would it be possible for someone to review this and let me know where I'm going wrong.  Im using VB and VS2010. This is my code:</p>
  
  <pre><code>Imports System.Text
  Imports System.Net.NetworkInformation.Ping
  
  Partial Class Ping
  Inherits System.Web.UI.Page
  
  
  Protected Sub btnPing_Click(sender As Object, e As System.EventArgs) Handles btnPing.Click
  
      Using System.Net.NetworkInformation
  
          Ping(Ping = New Ping())
          PingReply(pingReply = Ping.send("xxx.xx.xxx.xx"))
  
          Console.WriteLine("Address: {0}", pingReply.address)
          Console.WriteLine("Status: {0}", pingReply.Status)
  
      End Using
  
  End Sub
  End Class
  </code></pre>