65.9K
CodeProject is changing. Read more.
Home

How to, using ASP.NET

starIconstarIcon
emptyStarIcon
starIcon
emptyStarIconemptyStarIcon

2.33/5 (3 votes)

Nov 29, 2011

CPOL
viewsIcon

21651

Some useful tricks in ASP.NET.

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

Answer:

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

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

Answer:

<%
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:

<%
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:

<%
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:

<%
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:

<%
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:

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

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

Answer:

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

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

Answer:

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