use this c# code
MACAddress = MACAddress.Replace(":", "");
Response.Write(MACAddress);
string macAddresses = "";
foreach (System.Net.NetworkInformation.NetworkInterface nic in System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces())
{
if (nic.OperationalStatus == System.Net.NetworkInformation.OperationalStatus.Up)
{
macAddresses += nic.GetPhysicalAddress().ToString();
break;
}
}
Response.Write(macAddresses);