Click here to Skip to main content
15,064,915 members
Articles / Web Development / ASP.NET
Tip/Trick
Posted 29 Nov 2011

Tagged as

Stats

19.9K views
3 bookmarked

How to, using ASP.NET

Rate me:
Please Sign up or sign in to vote.
2.33/5 (3 votes)
29 Nov 2011CPOL
Some useful tricks in ASP.NET.

Question: How can I find out my computer's machine name with ASP.NET?


Answer:


ASP.NET
<%
Response.Write("The MachineName is " &
S􀁜stem.Environment.MachineName.ToString() )
%>

Question: How can I find out m􀁜 memor􀁜 working set with ASP.NET?


Answer:


ASP.NET
<%
Response.Write("The Working Set is " &
S􀁜stem.Environment.WorkingSet.ToString() & " b􀁜tes")
%>

Question: How can I find out m􀁜 S􀁜stem Director􀁜 with ASP.NET?


Answer:


ASP.NET
<%
Response.Write("The S􀁜stem Director􀁜 is " &
S􀁜stem.Environment.S􀁜stemDirector􀁜.ToString() )
%>

Question: How can I find out the OS Version m􀁜 computer is running with ASP.NET?


Answer:


ASP.NET
<%
Response.Write("The OS Version is " &
S􀁜stem.Environment.OSVersion.ToString() )
%>

Question: How can I find out the USERPROFILE environment variable with ASP.NET?


Answer:


ASP.NET
<%
Response.Write("The USERPROFILE environment variable is : " &
Environment.GetEnvironmentVariable("USERPROFILE"))
%>

Question: How can I find out what version of ASP.NET is running on my computer?


Answer:


ASP.NET
<%
Response.Write("The .NET version is " &
S􀁜stem.Environment.Version.ToString() )
%>

Question: How can I find out what version of ASP.NET is running on my computer?


Answer:


ASP.NET
<%
Response.Write("The .NET version is " &
S􀁜stem.Environment.Version.ToString() )
%>

Question: How can I find out where the temp director􀁜 is located?


Answer:


ASP.NET
<%
Response.Write("The TEMP environment variable is : " &
Environment.GetEnvironmentVariable("TEMP"))
%>

Question: How can I find out which account ASP.NET is running as?


Answer:


ASP.NET
<%
Response.Write("ASP.NET is running as the account : " &
Environment.Username)
%>

License

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

Share

About the Author

Denno.Secqtinstien
Technical Lead Erls Corporation
India India
I am Dinesh kumar Choudhary by Name, a software Designer and Developer by Work, a Indian Hindu by Religion, Co-Founder of DSFoundation located at http://dsfoundation.wordpress.com by profession, a Loving husband and a Caring Father by Relation.

I have a blog Website at http://dennosecqtinstien.wordpress.com. DSFoundation is the Autonomous body to serve for the management of Local shops located at New Delhi, India. Now a days DSFoundation and its subsidiaries are managed by Erls Corporation, an Another initiative by me and my colleagues, in which i am the another CO-Founder of the Organization. Erls Corporation can be located at http:erlsindia.co.in

Comments and Discussions

 
GeneralReason for my vote of 1 y? Pin
Paul_Williams7-Dec-11 1:30
MemberPaul_Williams7-Dec-11 1:30 
GeneralReason for my vote of 1 nothing new Pin
saurabh766-Dec-11 12:40
Membersaurabh766-Dec-11 12:40 
GeneralReason for my vote of 5 System.Environment.Version.ToString(... Pin
Jagz W30-Nov-11 1:40
professionalJagz W30-Nov-11 1:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.