Wrox Programmer Forums
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 6th, 2007, 03:14 AM
Authorized User
Join Date: Nov 2005
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to get MAC K Address

hi all,
im new to vs 2005. i have to check computer mack address at my login period. i need to check username, password and computer mack address.
but i dont use vs 2005 login control. im using my own logincontrol (two textbox for user name and password).
anyone know how i do this using c# coding.

Old July 9th, 2007, 11:18 AM
Friend of Wrox
Join Date: Feb 2006
Posts: 116
Thanks: 0
Thanked 0 Times in 0 Posts

You don't have to use the Login Web Control. It's often not necessary unless you want the functionalities it automatically implements for you. All web controls are convenience items only.

I am not sure how you get the MAC Address using the .NET framework classes.

As far as the username and password, since you are accepting them using two TextBox controls, you simply access the Text property of each in the button click event of your login button.
Old July 10th, 2007, 06:36 AM
Authorized User
Join Date: Nov 2006
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ef1196

Please excuse the VB code, but you should be able to translate quite easily.
        Dim mc As ManagementClass
        Dim moc As ManagementObjectCollection
        Dim mo As ManagementObject
        mc = New ManagementClass("Win32_NetworkAdapterConfiguration ")
        moc = mc.GetInstances() ' Get all network adapter instances
        For Each mo In moc
            If mo.Item("IPEnabled") Then
            End If

Best Regards,
Earl Francis

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get Client's MAC Address! mutinousguy ASP.NET 2.0 Professional 0 September 27th, 2007 07:42 PM
how to find mac address of my client...? abdusalam VB How-To 2 June 14th, 2006 04:02 AM
Getting the MAC Address mswombat Classic ASP Basics 0 June 3rd, 2006 11:45 AM
How to scan all Mac address in my network? cl408e C# 0 May 5th, 2006 05:12 AM
how to find mac address of my client...? abdusalam Pro VB.NET 2002/2003 1 August 3rd, 2004 03:59 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.