[C#]
private void Page_Load(object sender, System.EventArgs e) { if( Page.IsPostBack ) { string hostToPing = "www.yahoo.com"; ReplyPacketCollection reply = IcmpClient.Ping( hostToPing, 4); DataGrid dg = new DataGrid(); dg.DataSource = reply.ToDataTable(); dg.DataBind(); Page.Controls.Add( dg ); } }
[VB.NET]
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Page.IsPostBack Then Dim hostToPing As String = "www.yahoo.com" Dim reply As ReplyPacketCollection = IcmpClient.Ping(hostToPing, 4) Dim dg As New DataGrid() dg.DataSource = reply.ToDataTable() dg.DataBind() Page.Controls.Add(dg) End If End Sub
Copyright - Contact: Webmaster