Click here to Skip to main content
15,887,875 members
Articles / Web Development / ASP.NET
Tip/Trick

How to, using ASP.NET

Rate me:
Please Sign up or sign in to vote.
2.33/5 (3 votes)
29 Nov 2011CPOL 21K   3   3
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)


Written By
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
Paul_Williams7-Dec-11 1:30 
GeneralReason for my vote of 1 nothing new Pin
saurabh766-Dec-11 12:40
saurabh766-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.