Test VB.Net

Discussion in 'Suggestions, Bugs, and Features' started by DN Admin, May 30, 2010.

  1. DN Admin

    Staff Member

    Country:
    United States
    Joined:
    Aug 7, 2010
    Location:
    Joliet, IL U.S.A.
    Code:
    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
    
     
    #1
  2. DN Admin

    Staff Member

    Country:
    United States
    Joined:
    Aug 7, 2010
    Location:
    Joliet, IL U.S.A.
    Code:
    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());
    }            
    }
    
     
    #2
  3. DN Admin

    Staff Member

    Country:
    United States
    Joined:
    Aug 7, 2010
    Location:
    Joliet, IL U.S.A.
    Test reply without quote.
     
    #3
  4. DN Admin

    Staff Member

    Country:
    United States
    Joined:
    Aug 7, 2010
    Location:
    Joliet, IL U.S.A.
    One more test
     
    #4
  5. DN Admin

    Staff Member

    Country:
    United States
    Joined:
    Aug 7, 2010
    Location:
    Joliet, IL U.S.A.
    Test posting with different users.
     
    #5
  6. END_Man

    END_Man New Member

    Joined:
    Mar 16, 2013
    Location:
    CyberSpace
    Test with new name.
     
    #6
  7. DN Admin

    Staff Member

    Country:
    United States
    Joined:
    Aug 7, 2010
    Location:
    Joliet, IL U.S.A.
    Just a quick test.
     
    #7

Share This Page