Public Shared Function GetMac(ByVal ipAddr As String) As String
Dim macAddress As String = String.Empty
Try
Dim destIP As Net.IPAddress = Net.IPAddress.Parse(ipAddr)
Dim IP() As Byte = destIP.GetAddressBytes()
Dim IPInt As Int32 = BitConverter.ToInt32(IP, 0)
Dim mac() As Byte = New Byte(5) {}
SendARP(IPInt, 0, mac, mac.Length)
macAddress = BitConverter.ToString(mac, 0, mac.Length)
Catch ex As Exception
Debug.Write(ex.Message)
End Try
Return macAddress
End Function
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
Me.MACAddressDisplayLabel.Text = GetMac(Me.MacLocalIPAddressBox.Text)
End Sub
6 replies to this topic
#1
Posted 30 May 2010 - 03:57 PM
#2
Posted 30 May 2010 - 04:25 PM
protected void SendEMail(string MailTo, string MailFrom, string MailSubject, string MailBody)
{
MailMessage objEmail = new MailMessage();
objEmail.To = MailTo;
objEmail.From = MailFrom;
objEmail.Subject = MailSubject;
MailBody = MailBody.Replace("rn", "<br>");
MailBody = MailBody.Replace("t", " ");
objEmail.Body = MailBody;
objEmail.Priority = MailPriority.High;
objEmail.BodyFormat = MailFormat.Html;
try
{
SmtpMail.Send(objEmail);
}
catch (Exception exc)
{
Response.Write("Send failure: " + exc.ToString());
}
}
#3
Posted 16 July 2011 - 11:26 PM
#4
Posted 16 March 2013 - 02:38 PM
#5
Posted 16 March 2013 - 02:49 PM
#6
Posted 16 March 2013 - 02:51 PM
Test with new name.
#7
Posted 06 April 2013 - 03:20 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users




Sign In
Create Account
Back to top








