ASP.NET Page A Classic ASP.NET Example A Simple ASP.NET Inline Scripting Example A Simple ASP.NET Web Control Example
ASP.NET Page
Examples of simple ASP.NET pages.
A Classic ASP.NET Example
Examples of ASP.NET page with classic ASP style.
ASP.NET Code Input:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Sample Page</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
</head>
<body>
<%Response.Write("<p>Results on "& Request.ServerVariables("SERVER_SOFTWARE") & " .net: " & System.Environment.Version.ToString & " " & ScriptEngine & " Version " & ScriptEngineMajorVersion & "." & ScriptEngineMinorVersion & "</p>")%>
<%Response.Write("<h1>This is a Sample ASP.NET Page</h1>") %>
</body>
</html>
Translated HTML Code Input:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Sample Page</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
</head>
<body>
<p>Results on Microsoft-IIS/8.5 .net: 4.0.30319.42000 VB Version 14.0</p>
<h1>This is a Sample ASP.NET Page</h1>
</body>
</html>
HTML Web Page Embedded Output:
A Simple ASP.NET Inline Scripting Example
Examples of ASP.NET page with classic ASP style.
ASP.NET Code Input:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Sample Page</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
</head>
<body>
<%Response.Write("<p>Results on "& Request.ServerVariables("SERVER_SOFTWARE") & " .net: " & System.Environment.Version.ToString & " " & ScriptEngine & " Version " & ScriptEngineMajorVersion & "." & ScriptEngineMinorVersion & "</p>")%>
<%lbl01a.Controls.Add(New LiteralControl(("<p>ASP Paragraph</p>")))%>
<div id='lbl01a' runat='server'><h1>This is a Sample ASP.NET Page</h1></div>
</body>
</html>
Translated HTML Code Input:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Sample Page</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
</head>
<body>
<p>Results on Microsoft-IIS/8.5 .net: 4.0.30319.42000 VB Version 14.0</p><div id="lbl01a"><h1>This is a Sample ASP.NET Page</h1><p>ASP Paragraph</p></div>
</body>
</html>
HTML Web Page Embedded Output:
A Simple ASP.NET Web Control Example
Examples of ASP.NET code with ASP.net Web Control.
ASP.NET Code Input:
<%@ Page Language="VB" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Sample Page</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<script runat="server">
Sub Page_Load()
lbl01.Text="Hello World"
End Sub
</script>
</head>
<body>
<%Response.Write("<p>Results on "& Request.ServerVariables("SERVER_SOFTWARE") & " .net: " & System.Environment.Version.ToString & " " & ScriptEngine & " Version " & ScriptEngineMajorVersion & "." & ScriptEngineMinorVersion & "</p>")%>
<p><%-- Set on Page_Load --%>
<asp:Label id="lbl01" runat="server" />
</p>
<%Response.Write("<h1>This is a Sample ASP.NET Page</h1>")%>
</body>
</html>
Translated HTML Code Input:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Sample Page</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
</head>
<body>
<p>Results on Microsoft-IIS/8.5 .net: 4.0.30319.42000 VB Version 14.0</p>
<p>
<span id="lbl01">Hello World</span>
</p>
<h1>This is a Sample ASP.NET Page</h1>
</body>
</html>