SlideShare a Scribd company logo
Introduction to .NET
• Content :
– Introduction to .NET Technology
– Introduction to Web Based Applications
– Introduction to ASP.NET
1
Introduction to .NET Technology
3
What is .NET ?
Microsoft.NET is a Framework
– Microsoft .NET is a Framework which provides a common
platform to Execute or, Run the applications developed in
various programming languages.
– Microsoft announced the .NET initiative in July 2000.
– The main intention was to bridge the gap in
interoperability between services of various
programming languages.
.NET Framework Objectives
• The .NET Framework is designed to fulfill the following objectives:
– Provide object-oriented programming environment
– Provide environment for developing various types of
applications, such as Windows-based applications and Web-
based applications
– To ensure that code based on the .NET Framework can
integrate with any other code
4
.NET Framework
Common Language Specification
(CLR) Common Language Runtime
ADO.NET
C#
Visual
Studio
2008
ASP.NET
JScript …
Windows
Forms
VB C++
Operating System
Base Class Library
• The .NET Framework consists of:
– The Common Language Specification (CLS)
It contains guidelines, that language should follow so that
they can communicate with other .NET languages. It is also
responsible for Type matching.
– The Framework Base Class Libraries (BCL)
A consistent, object-oriented library of prepackaged
functionality and Applications.
– The Common Language Runtime (CLR)
A language-neutral development & execution environment
that provides common runtime for application execution .
6
Common Language Specification
CLS performs the following functions:
• Establishes a framework that helps enable cross-language
integration, type safety, and high performance code
execution
• Provides an object-oriented model that supports the
complete implementation of many programming
languages
• Defines rules that languages must follow, which helps
ensure that objects written in different languages can
interact with each other
7
.NET Framework Base Class Library
• The Class Library is a comprehensive, object-oriented collection
of reusable types
• These class library can be used to develop applications that
include:
– Traditional command-line applications
– Graphical user interface (GUI) applications
– Applications based on the latest innovations provided by ASP.NET
• Web Forms
• XML Web services
8
Common Language Runtime (CLR)
• CLR ensures:
– A common runtime environment for all .NET languages
– Uses Common Type System (strict-type & code-verification)
– Memory allocation and garbage collection
– Intermediate Language (IL) to native code compiler. Which
Compiles MSIL code into native executable code
– Security and interoperability of the code with other
languages
• Over 36 languages supported today
– C#, VB, Jscript, Visual C++ from Microsoft
– Perl, Python, Smalltalk, Cobol, Haskell, Mercury, Eiffel, Oberon, Oz, Pascal, APL,
CAML, Scheme, etc.
9
Execution in CLR
10
Common Language Runtime
VB
Source
code
Compiler
C++
C#
Assembly
IL Code
JIT Compiler
Managed
code
Native Code
Compiler Compiler
Assembly
IL Code
Assembly
IL Code
Operating System Services
Visual Studio 2008 IDE
Microsoft has introduced Visual Studio.NET,
which is a tool (also called Integrated Development
Environment) for developing .NET applications by
using programming languages such as VB, C#,
VC++ and VJ#. etc.
11
C# (C Sharp)
• Microsoft C# (pronounced C Sharp) developed by Microsoft
Corporation, USA
• New programming language that runs on the .NET Framework
• C# is simple, modern, type safe, and object oriented
• C# code is compiled as managed code
• Combines the best features of Visual Basic, C++ and Java
12
C# Features
• Simple
• Modern
• Object-Oriented
• Type-safe
• Versionable
• Compatible
• Secure
13
Introduction to Web Based
Applications
Introducing Web Applications
15
Static Dynamic
Static web page
• This type of web page consists
of HTML code typed directly
into text or a web page editor
• It is saved as an .htm or .html
file
• The content (text, images, hyperlinks, and so on) and
appearance of a static web page is always the same.
• These web pages do not utilize any database or any
other technology that dynamically builds up pages or
content at runtime based on their visitors input.
Web Page
How Are Static Web Pages Served ?
16
CLIENT
WEB SERVER
1. Author
writes
HTML
2. Client requests
the web page
3. Web Server locates
.html file
4. HTML stream( from the
.html page) returned to
the browser
5. Browser processes
HTML and displays
page
Dynamic web page
17
• Dynamic Web sites provide its visitors to modify the content of
the web page based on their input.
• They utilize databases and other mechanisms that enable to
– identify their visitors
– present them with customized greeting messages
– restructure the content according to user input etc..
• Examples:
– Online shopping stores,
– search engines
– email
– chat, community portals etc.
Dynamic web page
18
• Dynamic Web sites make use of “server-side
technology”.
• Server-side technologies add an extra layer to the
static web page that enables the Web Server to
generate HTML on the fly.
• The web server will first
– interpret the server-side code present in web
pages,
– generate the appropriate HTML and then
– send the response to the web browser.
How Are Dynamic Web Pages Served?
19
CLIENT
WEB SERVER
1. The Web browser
sends a request
3. Web Server collects the contents
(code + HTML) of the web page
and parses the contents to
produce HTML.
5. Browser processes
HTML and displays
page
2. The Web Server
searches for the
requested page 4. The HTML stream is
sent back to the
requesting browser
Introduction to ASP.NET
Introduction to ASP.NET
21
 ASP.NET is part of the Microsoft .NET framework
 ASP.NET is an effective and flexible technology for
creating interactive and dynamic web
pages.
 It is a convergence of two major Microsoft
technologies:
– Active Server Pages (ASP)
• Active Server Pages is Microsoft’s server side scripting
technology for building dynamic web pages.
– .NET Framework
• The .NET Framework is a suite of technologies designed
by Microsoft where program development takes place.
Introduction to ASP.NET
22
 It is built on .NET Common Language Runtime
 ASP.NET :
 Provides better user authentication
 Has better language support.
 Has a large set of new controls (web controls)
 Uses compiled code, which increases the performance of the
applications
 It is programmable using any of the .NET languages
(VB.NET, C#, VJ# etc).
 The ASP.NET pages are saved with the .aspx
extension.
Working of an ASP.NET Application
23
To execute an ASP.NET file, the
following steps are followed:
1. A web browser sends a
request for an ASP.NET file to
the web server by using a
URL.
1. The web server receives the
request and retrieves the
appropriate ASP.NET file from
the disk or memory.
1. The web server forwards the
file to the ASP.NET script
engine for processing.
CLIENT
WEB
SERVER
ASP.NET
Script
Engine
Working of an ASP.NET Application
24
4. The ASP.NET script engine reads
the file from top to bottom and
executes it.
5. The processed ASP.NET file is
generated as an HTML
document and the ASP.NET
script engine sends the HTML
page to the Web server.
6. The Web server then sends the
HTML code to the client which
interprets the output and
displays it.
CLIENT
WEB
SERVER
ASP.NET
Script
Engine
Advantages of ASP.NET
25
• Easy Programming Model
• Flexible Language Options
• Compiled Execution
• Rich Output Caching
• Web-Farm Session State
• Enhanced Reliability
• Master Pages
• Themes
• Improved Security
• Web Services
• Improved Performance and Scalability
Visual Studio 2008 IDE
26
Status Bar
Tool Box
Menu Bar
Solution
Explorer
Properties
Window
Document
window
Title Bar
Creating a New Web Application
27
• To start a new Web Application in VS 2008, Click the Create Web Site
button on the Start page or Select File > New > Web Site
• The New Web Site allows
you to choose:
• Templates
• Language for creating an
application
• Location where the application
will be created
Creating a New Application
(Continued)
28
 After you create a new Web Application, Default.aspx page is added to
this Website. To Rename this page, Select the page from the Website
node in the Solution Explorer > Right Click > Rename.
 Files can be added to the Project,
using Solution Explorer:
 Right click on the project node,
in the Solution Explorer, and
select the option Add New
Item.
 The Add New Item window will
popup.
 Select the type of file (item) to
be added and click on Add.
Solution Explorer
29
 Presents a tree view structure of files
present in the project.
– By default a New Website will contain:
• An App_Data folder
• A Default.aspx page (including
Default.aspx.cs)
To view Solution Explorer:
 Select View > Solution Explorer
OR
 Press buttons Ctrl+W,S
Solution Explorer (Continued)
30
 The Toolbar at the top of Solution Explorer enables various tasks.
Properties
Nest
Related
Files
View
Designer
ASP.NET
Configuration
Refresh
Code
Copy Website
Toolbox
31
 To add controls in the Design Window use
Toolbox.
 There are various tool tabs available in the
Toolbox.
– The controls in the IDE are presented in a
hierarchical manner (e.g., Standard Tab, Data
Tab, Validation, Navigation, WebParts etc.).
– Depending on the type of project (application)
the toolbox tabs will vary.
 To view the tool box:
– Select menu View > Toolbox
OR
– Press buttons Ctrl+Alt+X or Ctrl+W, X
 You can also view the controls as icons by
right-clicking on the toolbox you want to
change and deselecting the List View.
Properties Window
32
 To configure a control:
– Click once to select it
– Press F4 or Select menu View > Properties
window
– Modify the appropriate properties in the
window
 There are various options provided for
viewing the properties of the selected
control, such as:
– Categorized view
– Alphabetical view
– Properties view (default)
– Events View
– Property pages
 To view or change the properties and events of a selected control
during design use the Properties Window
Adding an Event
33
 Events can be added
to the code in one of
three ways:
1. Double clicking a control
in design view
2. Typing the code
manually
3. Selecting the Events
Icon and double clicking
the required event from
the Properties Window
Event Handler
For Button
Project Settings
34
– Right Click on the form you want set
as the startup page in the Solution
Explorer.
– Select option Set As Start Page.
 Setting Startup Page:
 Startup Project (In case of multiple
projects):
– Right Click on Project to set as startup
project in the Solution Explorer.
– Select Option Set As StartUp Project.
 Project Settings can be adjusted
using various options in the Project
Properties menu or by using the
Solution Explorer window.
– These settings change based on the
type of application developed.
Resources
35
• Visual Studio 2008 Website
http://msdn.microsoft.com/vstudio/
Questions and Comments
36

More Related Content

Similar to .Net Framework Overview. Fundamentals of .Net Framework (20)

Introduction to ASP.net. It provides basic introduction
Introduction to ASP.net. It provides basic introduction
ssuserbf6ebe
 
introaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.ppt
introaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.ppt
AvijitChaudhuri3
 
introaspnet.ppt
introaspnet.ppt
asmachehbi
 
introaspnet.ppt
introaspnet.ppt
IbrahimBurhan6
 
.Net Introduction
.Net Introduction
Muzzammil Wani
 
NETOverview1.ppt c# using asp.net activeX data object and XNL
NETOverview1.ppt c# using asp.net activeX data object and XNL
sagar490070
 
.Net overview
.Net overview
teach4uin
 
.Net framework
.Net framework
sanya6900
 
Bn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot net
conline training
 
Asp Architecture
Asp Architecture
Om Vikram Thapa
 
.Net overviewrajnish
.Net overviewrajnish
Rajnish Kalla
 
NETOverview1ppt.pptx
NETOverview1ppt.pptx
charusharma165
 
NETOverview1.ppt
NETOverview1.ppt
VivekRaj101435
 
.Net overview
.Net overview
AWADHESH PRATAP SINGH UNIVERSITY, REWA (M.P.)
 
Web development using asp.net
Web development using asp.net
Jagrit Vishwakarma
 
introasp_net-7364068.ppt
introasp_net-7364068.ppt
IQM123
 
introasp_net-6563550.ppt
introasp_net-6563550.ppt
IQM123
 
Asp.net new
Asp.net new
Ganesh Jaya
 
Introduction to ASP NET.pptxIntroduction to ASP NET.pptx
Introduction to ASP NET.pptxIntroduction to ASP NET.pptx
ssuserbf6ebe
 
As Pdotnet
As Pdotnet
balujalabs
 
Introduction to ASP.net. It provides basic introduction
Introduction to ASP.net. It provides basic introduction
ssuserbf6ebe
 
introaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.ppt
introaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.ppt
AvijitChaudhuri3
 
introaspnet.ppt
introaspnet.ppt
asmachehbi
 
NETOverview1.ppt c# using asp.net activeX data object and XNL
NETOverview1.ppt c# using asp.net activeX data object and XNL
sagar490070
 
.Net overview
.Net overview
teach4uin
 
.Net framework
.Net framework
sanya6900
 
Bn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot net
conline training
 
.Net overviewrajnish
.Net overviewrajnish
Rajnish Kalla
 
introasp_net-7364068.ppt
introasp_net-7364068.ppt
IQM123
 
introasp_net-6563550.ppt
introasp_net-6563550.ppt
IQM123
 
Introduction to ASP NET.pptxIntroduction to ASP NET.pptx
Introduction to ASP NET.pptxIntroduction to ASP NET.pptx
ssuserbf6ebe
 

Recently uploaded (20)

Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
AmirStern2
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
The State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry Report
Liveplex
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
Edge AI and Vision Alliance
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
Edge-banding-machines-edgeteq-s-200-en-.pdf
Edge-banding-machines-edgeteq-s-200-en-.pdf
AmirStern2
 
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
Analysis of the changes in the attitude of the news comments caused by knowin...
Analysis of the changes in the attitude of the news comments caused by knowin...
Matsushita Laboratory
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
 
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
 
Oracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization Program
VICTOR MAESTRE RAMIREZ
 
Introduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUE
Google Developer Group On Campus European Universities in Egypt
 
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
Safe Software
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
AmirStern2
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
The State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry Report
Liveplex
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
Edge AI and Vision Alliance
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
Edge-banding-machines-edgeteq-s-200-en-.pdf
Edge-banding-machines-edgeteq-s-200-en-.pdf
AmirStern2
 
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
Analysis of the changes in the attitude of the news comments caused by knowin...
Analysis of the changes in the attitude of the news comments caused by knowin...
Matsushita Laboratory
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
 
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
 
Oracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization Program
VICTOR MAESTRE RAMIREZ
 
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
Safe Software
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
 
Ad

.Net Framework Overview. Fundamentals of .Net Framework

  • 1. Introduction to .NET • Content : – Introduction to .NET Technology – Introduction to Web Based Applications – Introduction to ASP.NET 1
  • 2. Introduction to .NET Technology
  • 3. 3 What is .NET ? Microsoft.NET is a Framework – Microsoft .NET is a Framework which provides a common platform to Execute or, Run the applications developed in various programming languages. – Microsoft announced the .NET initiative in July 2000. – The main intention was to bridge the gap in interoperability between services of various programming languages.
  • 4. .NET Framework Objectives • The .NET Framework is designed to fulfill the following objectives: – Provide object-oriented programming environment – Provide environment for developing various types of applications, such as Windows-based applications and Web- based applications – To ensure that code based on the .NET Framework can integrate with any other code 4
  • 5. .NET Framework Common Language Specification (CLR) Common Language Runtime ADO.NET C# Visual Studio 2008 ASP.NET JScript … Windows Forms VB C++ Operating System Base Class Library
  • 6. • The .NET Framework consists of: – The Common Language Specification (CLS) It contains guidelines, that language should follow so that they can communicate with other .NET languages. It is also responsible for Type matching. – The Framework Base Class Libraries (BCL) A consistent, object-oriented library of prepackaged functionality and Applications. – The Common Language Runtime (CLR) A language-neutral development & execution environment that provides common runtime for application execution . 6
  • 7. Common Language Specification CLS performs the following functions: • Establishes a framework that helps enable cross-language integration, type safety, and high performance code execution • Provides an object-oriented model that supports the complete implementation of many programming languages • Defines rules that languages must follow, which helps ensure that objects written in different languages can interact with each other 7
  • 8. .NET Framework Base Class Library • The Class Library is a comprehensive, object-oriented collection of reusable types • These class library can be used to develop applications that include: – Traditional command-line applications – Graphical user interface (GUI) applications – Applications based on the latest innovations provided by ASP.NET • Web Forms • XML Web services 8
  • 9. Common Language Runtime (CLR) • CLR ensures: – A common runtime environment for all .NET languages – Uses Common Type System (strict-type & code-verification) – Memory allocation and garbage collection – Intermediate Language (IL) to native code compiler. Which Compiles MSIL code into native executable code – Security and interoperability of the code with other languages • Over 36 languages supported today – C#, VB, Jscript, Visual C++ from Microsoft – Perl, Python, Smalltalk, Cobol, Haskell, Mercury, Eiffel, Oberon, Oz, Pascal, APL, CAML, Scheme, etc. 9
  • 10. Execution in CLR 10 Common Language Runtime VB Source code Compiler C++ C# Assembly IL Code JIT Compiler Managed code Native Code Compiler Compiler Assembly IL Code Assembly IL Code Operating System Services
  • 11. Visual Studio 2008 IDE Microsoft has introduced Visual Studio.NET, which is a tool (also called Integrated Development Environment) for developing .NET applications by using programming languages such as VB, C#, VC++ and VJ#. etc. 11
  • 12. C# (C Sharp) • Microsoft C# (pronounced C Sharp) developed by Microsoft Corporation, USA • New programming language that runs on the .NET Framework • C# is simple, modern, type safe, and object oriented • C# code is compiled as managed code • Combines the best features of Visual Basic, C++ and Java 12
  • 13. C# Features • Simple • Modern • Object-Oriented • Type-safe • Versionable • Compatible • Secure 13
  • 14. Introduction to Web Based Applications
  • 15. Introducing Web Applications 15 Static Dynamic Static web page • This type of web page consists of HTML code typed directly into text or a web page editor • It is saved as an .htm or .html file • The content (text, images, hyperlinks, and so on) and appearance of a static web page is always the same. • These web pages do not utilize any database or any other technology that dynamically builds up pages or content at runtime based on their visitors input. Web Page
  • 16. How Are Static Web Pages Served ? 16 CLIENT WEB SERVER 1. Author writes HTML 2. Client requests the web page 3. Web Server locates .html file 4. HTML stream( from the .html page) returned to the browser 5. Browser processes HTML and displays page
  • 17. Dynamic web page 17 • Dynamic Web sites provide its visitors to modify the content of the web page based on their input. • They utilize databases and other mechanisms that enable to – identify their visitors – present them with customized greeting messages – restructure the content according to user input etc.. • Examples: – Online shopping stores, – search engines – email – chat, community portals etc.
  • 18. Dynamic web page 18 • Dynamic Web sites make use of “server-side technology”. • Server-side technologies add an extra layer to the static web page that enables the Web Server to generate HTML on the fly. • The web server will first – interpret the server-side code present in web pages, – generate the appropriate HTML and then – send the response to the web browser.
  • 19. How Are Dynamic Web Pages Served? 19 CLIENT WEB SERVER 1. The Web browser sends a request 3. Web Server collects the contents (code + HTML) of the web page and parses the contents to produce HTML. 5. Browser processes HTML and displays page 2. The Web Server searches for the requested page 4. The HTML stream is sent back to the requesting browser
  • 21. Introduction to ASP.NET 21  ASP.NET is part of the Microsoft .NET framework  ASP.NET is an effective and flexible technology for creating interactive and dynamic web pages.  It is a convergence of two major Microsoft technologies: – Active Server Pages (ASP) • Active Server Pages is Microsoft’s server side scripting technology for building dynamic web pages. – .NET Framework • The .NET Framework is a suite of technologies designed by Microsoft where program development takes place.
  • 22. Introduction to ASP.NET 22  It is built on .NET Common Language Runtime  ASP.NET :  Provides better user authentication  Has better language support.  Has a large set of new controls (web controls)  Uses compiled code, which increases the performance of the applications  It is programmable using any of the .NET languages (VB.NET, C#, VJ# etc).  The ASP.NET pages are saved with the .aspx extension.
  • 23. Working of an ASP.NET Application 23 To execute an ASP.NET file, the following steps are followed: 1. A web browser sends a request for an ASP.NET file to the web server by using a URL. 1. The web server receives the request and retrieves the appropriate ASP.NET file from the disk or memory. 1. The web server forwards the file to the ASP.NET script engine for processing. CLIENT WEB SERVER ASP.NET Script Engine
  • 24. Working of an ASP.NET Application 24 4. The ASP.NET script engine reads the file from top to bottom and executes it. 5. The processed ASP.NET file is generated as an HTML document and the ASP.NET script engine sends the HTML page to the Web server. 6. The Web server then sends the HTML code to the client which interprets the output and displays it. CLIENT WEB SERVER ASP.NET Script Engine
  • 25. Advantages of ASP.NET 25 • Easy Programming Model • Flexible Language Options • Compiled Execution • Rich Output Caching • Web-Farm Session State • Enhanced Reliability • Master Pages • Themes • Improved Security • Web Services • Improved Performance and Scalability
  • 26. Visual Studio 2008 IDE 26 Status Bar Tool Box Menu Bar Solution Explorer Properties Window Document window Title Bar
  • 27. Creating a New Web Application 27 • To start a new Web Application in VS 2008, Click the Create Web Site button on the Start page or Select File > New > Web Site • The New Web Site allows you to choose: • Templates • Language for creating an application • Location where the application will be created
  • 28. Creating a New Application (Continued) 28  After you create a new Web Application, Default.aspx page is added to this Website. To Rename this page, Select the page from the Website node in the Solution Explorer > Right Click > Rename.  Files can be added to the Project, using Solution Explorer:  Right click on the project node, in the Solution Explorer, and select the option Add New Item.  The Add New Item window will popup.  Select the type of file (item) to be added and click on Add.
  • 29. Solution Explorer 29  Presents a tree view structure of files present in the project. – By default a New Website will contain: • An App_Data folder • A Default.aspx page (including Default.aspx.cs) To view Solution Explorer:  Select View > Solution Explorer OR  Press buttons Ctrl+W,S
  • 30. Solution Explorer (Continued) 30  The Toolbar at the top of Solution Explorer enables various tasks. Properties Nest Related Files View Designer ASP.NET Configuration Refresh Code Copy Website
  • 31. Toolbox 31  To add controls in the Design Window use Toolbox.  There are various tool tabs available in the Toolbox. – The controls in the IDE are presented in a hierarchical manner (e.g., Standard Tab, Data Tab, Validation, Navigation, WebParts etc.). – Depending on the type of project (application) the toolbox tabs will vary.  To view the tool box: – Select menu View > Toolbox OR – Press buttons Ctrl+Alt+X or Ctrl+W, X  You can also view the controls as icons by right-clicking on the toolbox you want to change and deselecting the List View.
  • 32. Properties Window 32  To configure a control: – Click once to select it – Press F4 or Select menu View > Properties window – Modify the appropriate properties in the window  There are various options provided for viewing the properties of the selected control, such as: – Categorized view – Alphabetical view – Properties view (default) – Events View – Property pages  To view or change the properties and events of a selected control during design use the Properties Window
  • 33. Adding an Event 33  Events can be added to the code in one of three ways: 1. Double clicking a control in design view 2. Typing the code manually 3. Selecting the Events Icon and double clicking the required event from the Properties Window Event Handler For Button
  • 34. Project Settings 34 – Right Click on the form you want set as the startup page in the Solution Explorer. – Select option Set As Start Page.  Setting Startup Page:  Startup Project (In case of multiple projects): – Right Click on Project to set as startup project in the Solution Explorer. – Select Option Set As StartUp Project.  Project Settings can be adjusted using various options in the Project Properties menu or by using the Solution Explorer window. – These settings change based on the type of application developed.
  • 35. Resources 35 • Visual Studio 2008 Website http://msdn.microsoft.com/vstudio/

Editor's Notes