Windows : Asp.NET test page

By | January 31, 2012

Just like php, you can create a test page in order to verify if .NET is installed and working properly. The following will also display the running version.

Simply create plain text file using Notepad or your favorite text editor :

test.aspx

And insert this code :

<%@ Page Language="VB" %>
<script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
lblVersion.Text = "Your server is running ASP.NET and the version is " & System.Environment.Version.ToString()
End Sub
</script>

<html>
<head>
<title>ASP.NET Version</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Label ID="lblVersion" runat="server"></asp:Label>
</form>
</body>
</html>