Live Chat Icon For mobile
Live Chat Icon

How to get the Computer Name on which the code is running

Platform: ASP.NET| Category: Miscellaneous

This will return the information of the server computer, not the client browser computer.

Add reference to System.Windows.Forms.dll.

VB.NET


Response.Write(System.Windows.Forms.SystemInformation.ComputerName)

C#


Response.Write(System.Windows.Forms.SystemInformation.ComputerName);

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.