Home | Contact Us | Download | Support | Purchase | Products

Product List
  "The new DLLs worked like a champ and fixed the problem...Thanks for the fast help on this, you were a lifesaver!"
J. Lloyd

Ping to a DataGrid

The following example demonstrates how to bind the results of a ping to a datagrid.


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();
		Page.Controls.Add( dg );


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()
    End If

End Sub







The box is not shipped. aspNetPing is a downloadable product.