Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi All,
I want to Enable/Disable the Network (LAN )connection in my system using C# programs.I am using .Net 2.0 for my development & I need to do this in this framework.
Please advice me how to do it.
Thanks in Advance.
Mahe
Posted
Updated 2-Jan-11 20:07pm
v3
Comments
TweakBird 3-Jan-11 2:08am    
Title spell corrected. 'diable' replaced with 'disable'.

You could run something similar to this[^] via the command prompt.
 
Share this answer
 
Hope Using the netsh interface Usage set interface [name = ] IfName [ [admin = ] ENABLED|DISABLED [connect = ] CONNECTED|DISCONNECTED [newname = ] NewName ] this will give an idea.
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900