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

By -

//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 text box or cab save it to database.

// So guys if you still have any problem than comment on this blog. Ok bye happy coding…. :)

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 *