VB.NET - Code Samples - Ping,Upload and Download using vb.net vb.net 2005


sample code showing how to ping, upload and download files using vb.net 2005

The Solution:

Uploading and Downloading files is simplified in vb.net 2005. You can ping, upload and download files using only a few lines of code.
More Info

The Code:

	If My.Computer.Network.Ping("www.google.com", 1000) Then
  		MsgBox("Server pinged successfully.")
  		MsgBox("Ping request timed out.")
	End If

	My.Computer.Network.DownloadFile _
    	("http://www.google.com/downloads/SomeFile.txt", _

	My.Computer.Network.UploadFile( _
	"C:\Documents\SomeFile.txt", _

About this page: