Bojensen Blogs

Tag: network

Ping an IP address with C#

1: Ping p = new System.Net.NetworkInformation.Ping(); 2: PingReply r; 3:  4: String s = "10.10.10.10"; //Replace input from your text box for IP address here 5:  6: r = p.Send(s); 7:  8: Response.Buffer = false; 9:  10: if (r.Status == IPStatus.Success) 11: { 12: 13: lblpingstatus.Text = "Ping to " + s.ToString() + "[" +…

How to ping an IP address from vb.net

http://www.eggheadcafe.com/software/aspnet/33118839/ping-an-ip-address.aspx or 1: Imports System.Net 2: Imports System.Net.NetworkInformation 3: Imports System.Text 4:  5: Partial Public Class _Default : Inherits System.Web.UI.Page 6: 7: Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) 8:  9: End Sub 10:  11: Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click 12: Try 13: lblStatus.Text =…