Asp.Net and C# code to retrieved Mac Address of System

By -

Asp.Net and C# code to retrieved Mac Address of System

//Add following namespaces:

using System.Web.UI.WebControls;

using System.Net.NetworkInformation;

 

//Add following code on button click or form_load etc.

NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();       

String Mac_Address = nics[0].GetPhysicalAddress().ToString();

 

//String Mac_Address refer Mac Address of system you can display it in the text box or can save it to the database.

 Guys if you still have any problem then comment below. 

WE LOVE FEEDBACK! AND DON'T FORGET TO SUBSCRIBE TO OUR NEWSLETTER :)

Leave a Reply

Your email address will not be published. Required fields are marked *