Jitesh Byahut 2/16/2014 2987

Win32_NetworkAdapter in WMI C# Asp.Net

Here we are retrieving network adapter details of Computer.

Use namespace System.Management

ManagementObjectSearcher objadapter = new ManagementObjectSearcher("select * from Win32_NetworkAdapter");

        foreach (ManagementObject obj in objadapter.Get())

        {

            Response.Write("Name  -    " + obj["Name"] + "</br>");

            Response.Write("NetEnabled  -    " + obj["NetEnabled"] + "</br>");

            Response.Write("AdapterType  -    " + obj["AdapterType"] + "</br>");

            Response.Write("Availability  -    " + obj["Availability"] + "</br>");

            Response.Write("Manufacturer  -    " + obj["Manufacturer"] + "</br>");

            Response.Write("NetConnectionID  -    " + obj["NetConnectionID"] + "</br>");

            Response.Write("NetConnectionStatus  -    " + obj["NetConnectionStatus"] + "</br>");

        }

Demo

View output :

demoimage


Please give your feedback for improving this page