How to find all the port number of our local system using asp.net
How to find all the port number of our local system using asp.net? In this article I'm going to explain how to get list of ports installed in your system by using asp.net. You need to import System.IO.Ports name space top of the page.
In this article I'm going to explain how to get list of ports installed in your system by using asp.net. You need to import System.IO.Ports name space top of the page.
Imports System.IO.Ports
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim ports As String() = SerialPort.GetPortNames()
Response.Write("The following serial ports were found in your system:")
Response.Write("<BR>")
' Display each port name to the web page.
Dim strport As String
For Each strport In ports
Response.Write(strport)
Next strport
End Sub
End Class