
Projects By LANGUAGE
Libraries
Articles & seminars
Source Code

| Pinging with options using ASP.NET and C# .NET | |||||
Getting Started | |||||
The .NET Framework offers a number of types that makes accessing resources on the network easy. To display an external webpage we will need to use the System.IO, System.Net, and System.Text namespaces. |
|||||
using System.Net; using System.Net.NetworkInformation; using System.Text; |
|||||
|
|
|||||
|
We'll put our code in the btnSubmit_Click() event.
When the btnSubmit_Click() event fires it creates a new Ping object. We can then execute the Send method of this object to send a ping to the host specified in our text box. Executing this method also returns a PingReply object which we can use to gather information such as the Address, Roundtrip Time, TTL, and Buffer Size. In addition, we define ping options using the PingOptions class. | |||||
|
|||||
