Here I have created sample that will help you out.
HTML
<div>
<asp:DropDownList ID="ddlDevices" runat="server">
</asp:DropDownList>
</div>
C#
protected void Page_Load(object sender, EventArgs e)
{
List<USBDeviceInfo> devices = GetUSBDevices();
ddlDevices.DataSource = devices;
ddlDevices.DataTextField = "DeviceID";
ddlDevices.DataValueField = "DeviceID";
ddlDevices.DataBind();
}
public static List<USBDeviceInfo> GetUSBDevices()
{
List<USBDeviceInfo> devices = new List<USBDeviceInfo>();
ManagementObjectCollection collection;
using (var searcher = new ManagementObjectSearcher(@"Select * From Win32_USBHub"))
collection = searcher.Get();
foreach (var device in collection)
{
devices.Add(new USBDeviceInfo()
{
DeviceID = (string)device.GetPropertyValue("DeviceID"),
DeviceDescription = (string)device.GetPropertyValue("Description"),
PnpDeviceID = (string)device.GetPropertyValue("PNPDeviceID")
});
}
collection.Dispose();
return devices;
}
USBDeviceInfo class
public class USBDeviceInfo
{
public string DeviceID { get; set; }
public string DeviceDescription { get; set; }
public string PnpDeviceID { get; set; }
}
Screenshot
