
Introduction to ASP.NET. Some references: Beginning ASP.NET using VB.NET; Wrox; 2002 chpt 2. Kalata, K, Introduction to ASP.NET – 2002, chpt 1. Esposito, D. Programming Microsoft ASP.NET, chpt 1. Morrison, M. and Morrison, J. Database driven web sites (2nd edn). Chpt 6.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Compilers use the runtime type system to produce type compatiblecomponents
Components
C#
VB
C++
Compilers
Runtime Environment
Common Type System
VB
C++
C#
JScript
…
Visual Studio.NET
Common Language Specification
Web Forms
(ASP.NET)
Win Forms
Data and XML
Base Class Library
Common Language Runtime
System.WinForms
System.Web
Controls
Drawing
Web Services
Web Forms
Windows Application Services
ASP.NET Application Services
System Base Framework
ADO.NET
XML
SQL
Threading
IO
Net
Security
ServiceProcess
Common Language Runtime
Type System
Metadata
Execution
<%@ Import NamespaceName %>
<%@ Imports System.Web.UI.Page %>
<input type="text" runat="server"/>
<input type=”radio” runat=”server” value=”Yes”/> Yes
<asp:Button id="ShowBtn" runat="server" Text="Show the message." />
Server controls with Visual Studio.NET
<%@ Page Language="vb" Codebehind="WebForm1.vb" Inherits=“MyFirstApp.WebForm1"%>
<html>
<head> <title>Inserting ASP.NET code Example</title> </head>
<body>
Line1: First HTML Line<br />
Line2: Second HTML Line<br />
Line3: Third HTML Line<br />
</body>
</html>
<script language="VB" runat="server">
Sub Page_Load()
Response.Write ("First ASP.NET Line<br />")
Response.Write ("Second ASP.NET Line<br />")
Response.Write ("Third ASP.NET Line<br />")
End Sub
</script>
<html> <head> <title>Inserting ASP.NET code Example</TITLE> </head>
<body>
Line1: First HTML Line<br />
Line2: Second HTML Line<br />
Line3: Third HTML Line<br />
</body>
</html>
html>
<head><title>Inserting ASP.NET code Example</title></head>
<body>
Line1: First HTML Line<br />
Line2: Second HTML Line<br />
Line3: Third HTML Line<br />
<script language="VB" runat="server">
Sub Page_Load()
Response.Write ("First ASP.NET Line<br />")
Response.Write ("Second ASP.NET Line<br />")
Response.Write ("Third ASP.NET Line<br />")
End Sub
</script>
</body>
</html>
<html>
<head>
<title>Interweaving ASP.NET code and HTML Example</title>
</head>
<body>
Line1: First HTML Line<br />
<% Response.Write ("First ASP.NET Line<br />") %>
Line2: Second HTML Line<br />
<% Response.Write ("Second ASP.NET Line<br />") %>
Line3: Third HTML Line<br />
<% Response.Write ("Third ASP.NET Line<br />") %>
</body>
</html>
NOT RECOMMENDED.
script language="VB" runat="server">
Sub Page_Load()
Message.Text="The ASP.NET line"
End Sub
</script>
<html>
<head> <title>Inserting ASP.NET code Example</TITLE> </head>
<body>
First HTML Line<br/>
<asp:label id=Message runat="server"/> <br />
Second HTML Line<br/>
</body>
</html>
' hello.vb - displays hello world
' Created 06/01/2002
Imports System
Public Module Hello
Sub Main()
Dim s1 As String = "1 - Hello World"
Console.WriteLine(s1)
End Sub
End Module
' Run this at the command line
' vbc hello.vb
Using the ILDASM to view the assembly and classes