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


Product List
 
  "[aspNetEmail] is so simple and trouble free, that it seems there is little to say about it - but I guess that says a lot. It is very easy to learn/use and just works!"
Jim Duncan
PCC Nurses Agency
 
More
Testimonies

TraceRoute results to a DataGrid

The following example demonstrates how to perform a simple TraceRoute to the remote host, www.yahoo.com, and bind the results to a datagrid. 

[C#]

		private void Page_Load(object sender, System.EventArgs e)
		{
			if( Page.IsPostBack )
			{
				TraceRouteReplyCollection results = TraceRouteClient.Trace(txtHost.Value, 30, true );
				DataGrid dg = new DataGrid();
				dg.DataSource = results.ToDataTable();
				dg.DataBind();
				Page.Controls.Add( dg );
			}
		}

	




[VB.NET]


Private Sub Page_Load(sender As Object, e As System.EventArgs)
   If Page.IsPostBack Then
      Dim results As TraceRouteReplyCollection = TraceRouteClient.Trace(txtHost.Value, 30, True)
      Dim dg As New DataGrid()
      dg.DataSource = results.ToDataTable()
      dg.DataBind()
      Page.Controls.Add(dg)
   End If
End Sub 'Page_Load




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