Professional Documents
Culture Documents
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.
• VS.NET on line documentation + Quickstart tutorials
• What is ASP.NET and how is different from ASP
– ASP: server side technology for creating dynamic web pages using
scripting languages eg vb script.
– ASP.NET: server side technology for creating dynamic web pages
using Fully Fledged programming languages supported by .NET
– VB.NET: our chosen language for writing ASP.NET pages
What is .NET?
• A Microsoft strategy and new technology for delivering software
services to the desktop and to the web
• Components include:
– MS Intermediate Language; all code is complied into a more abstract,
trimmed version before execution. All .NET languages are compiled to MSIL
– the common language of .NET
– The CLR- common language runtime; responsible for executing MSIL code;
interfaces to Windows and IIS
– A rich set of libraries (Framework Class Libraries) available to all .NET
languages
– The .NET languages such as C#, VB.NET etc that conform to CLR
– ASP.NET is how the Framework is exposed to the web, using IIS to manage
simple pages of code so that they can be complied into full .NET programs.
These generate HTML for the browser.
• Built on open protocols (XML, SOAP)
• Future for development of MS & non-MS based systems.
• Also heading towards the “Internet Operating System”
Common Language
Runtime Type System
Compilers use the runtime type system to produce type
compatible components
Components
C# VB C++ Compilers
Runtime Environment
Common Type System
Robust And Secure
• Native code compilation
MSIL
No interpreter
Install-time or run-time IL to native compilation
• Evidence-based security
Policy grants permissions based on evidence (signatures, origin)
.NET Execution Model
VB VC ... Script
Native
IL
Code
Native
Code
Common Language Runtime
• Lightweight Just-in-time compiler:
– MSIL to Native machine language; Can be ported to numerous platforms
• The compiled code is transformed into an intermediate language
called the Microsoft Intermediate Language (MSIL or IL)
• An integer in Visual Basic .NET or an int in C# are converted to
the same .NET data type, which is Int32
• The IL that is created is the same for all languages
• The assembly is the compiled .NET program
• The assembly contains the IL along with additional information
called metadata
• Metadata contains information about the assembly
• Use the IL Disassembler (ildasm.exe) to view the IL within an
assembly
Framework Overview
VB C++ C# JScript …
Visual Studio.NET
Web Forms
Win Forms
(ASP.NET)
System.Web System.WinForms
Web Services Web Forms Controls Drawing
• Mobile controls
– A series of controls that provide form functionality within wireless
and mobile devices
• Literal controls
– Page content that is not assigned to a specific HTML control such as
a combination of HTML tags and text to the browser
Server Controls within
Visual Studio .NET
• In Visual
Studio .NET most
of the ASP.NET
Server controls are
located on the Web
Forms tab in the
toolbox
NOT RECOMMENDED.
Interweave2.aspx A Server control
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>
Web application project files
AssemblyInfo.vb Info about the compiled project file stored in
/bin and named project.dll
Global.asax Event handler commands visible to all web
forms in a project
Global.asax.resx Define application resources such as text
strings, images. Can change without
recompiling project.
Global.asax.vb Asp.net code for application events eg
session.start
Project.sln Stores links to all project files
Project.suo VS.NET IDE configuration info for the proj.
Project.vbproj Configuration and build settings for project
files.
Web application project files cont.
Project.vbproj.webinfo URL to project web server
Project.vsdisco Enables search for web services
Styles.css Project style sheet
Web.config Project and folder configuration information
Webform.aspx Web form .aspx file;Html
Webform.aspx.resx Resources in corresponding web form
Webform.aspx.vb Code written for the form (code behind)
Bin\project.dll Compiled project output file (assembly)