SlideShare a Scribd company logo
2
Most read
4
Most read
8
Most read
Introduction to ASP.NET
What is ASP?
• ASP stands for Active Server Pages
• ASP is a Microsoft Technology
• ASP is a program that runs inside a web
server
• An ASP file is just the same as an HTML file
• An ASP file can contain server scripts in
addition to HTML
• Server scripts in an ASP file are executed
on the server
<!DOCTYPE html>
<html>
<body>
<%
response.write("My first ASP script!")
%>
</body>
</html>
• ASP.NET is an open-source server-side web
application framework designed for web
development to produce dynamic web
pages.
• It was developed by Microsoft to
allow programmers to build dynamic web
sites, web applications and web services.
ASP.NET
ASP.NET Benefits
• Separate Presentation from code
• Object Oriented Approach
• Event Driven Architecture
• Code Compilation
• Built in State Management
• Many others (data binding, validation, master
page etc…)
ASP.NET Execution
• ASP.NET Applications are executed via sequence of HTTP
Requests and HTTP Responses
• Client Browser request ASPX pages
• The webserver executes the ASPX page and
produce html + css + javascript
Using ASP.NET
• Simple Web Pages
• Web Forms
• MVC (model view controller)
• SignalR
ASP.NET Working
Traditional web pages
• Consist of static html, images, styles etc.
• Execute code on the client side
• Simple operations
ASP.NET Webforms
• Execute code on the server side
• Database access
• Dynamic Pages
• High Security level
Separate Presentation from code
In traditional web development, HTML and
programming code in one file
• Hard to read, understand
• Hard to test and debug
ASP.NET Splits web pages into two parts:
• .aspx file containing HTML
• Code-behind file contain the presentation logic
for the particular page
Simple ASP.NET Application
Steps to create simple ASP.NET Application
1.Start Visual Studio
2.Create “New website”
3.Add 2 text fields, 1 label, 1 button
4.Double click on the button
5.Add code to add numbers entered in text fields
6.Display the result in the label
ASP.NET Base Components
• Web Forms – Deliver ASP.NET user interface
• Web Control – the components the we can use
in our web application (eg:textbox)
• “Code-behind” – contains the server side code
• Web.config – Contains ASP.NET application
configuration
• Machine.config – contains configurations for all
applications in the server
• Global.asax – class containing application level
event handlers
ASP.NET Web Controls
ASP.NET Web controls are the smallest component part
Deliver fast and easy component-oriented development
process
HTML abstraction, but finally everything is HTML
<form runat="server" ID="frmMain">
<asp:button runat="server" ID="btn" Text="Click me!"
OnClick="btn_Click" />
</form>
Web.config
Main settings and configuration file for ASP.NET
Text based XML document
Defines:
Connection strings to any DB used by app
The default language for child pages
Whether debugging is allowed
Global.asax
Also known as ASP.NET application file
Located in the Web application root folder
Exposes application and session level events
Application_Start
Application_End
Session_Start
Session_End
etc…
ASP.NET Execution model
• First call to a page
ASP.NET Execution model
• Any other call after first
Coding Methods
Writing code in an ASP.NET Web form is done in
three ways:
Mixed code method
Inline code method
Code-behind method
Mixed Code Method
The code is in the same file as the web content, mixed with
the HTML code
This method is not recommended as the source code is hard
to read and maintain
Inline Code Method
The code is separated in a SCRIPT section in the same file
Code-Behind Method
A separate compiled file containing the program logic of the
page
Each web page has its own code-behind page
Has the same name as the web page to which it is attached
The file extension is .aspx.cs
The two files are built into one when the application is
started

More Related Content

What's hot (20)

PPTX
PHP FUNCTIONS
Zeeshan Ahmed
 
PDF
Asp.net state management
priya Nithya
 
PPT
Asp.net basic
Neelesh Shukla
 
PPTX
Client side scripting and server side scripting
baabtra.com - No. 1 supplier of quality freshers
 
PPTX
Web api
Sudhakar Sharma
 
PPTX
Ado.Net Tutorial
prabhu rajendran
 
PPTX
ASP.NET Page Life Cycle
Abhishek Sur
 
PPS
Java rmi
kamal kotecha
 
PPSX
JDBC: java DataBase connectivity
Tanmoy Barman
 
PPT
Server Controls of ASP.Net
Hitesh Santani
 
PPT
Eclipse introduction IDE PRESENTATION
AYESHA JAVED
 
PPT
Web Engineering
Muhammad Muzammal
 
PPTX
Form Validation in JavaScript
Ravi Bhadauria
 
PPTX
Common language runtime clr
SanSan149
 
PPT
Ppt of web development
bethanygfair
 
PPT
Master pages
teach4uin
 
PPSX
Introduction to .net framework
Arun Prasad
 
PPT
Asp.net architecture
Iblesoft
 
PPT
Scripting languages
teach4uin
 
PPT
vb.net Constructor and destructor
suraj pandey
 
PHP FUNCTIONS
Zeeshan Ahmed
 
Asp.net state management
priya Nithya
 
Asp.net basic
Neelesh Shukla
 
Client side scripting and server side scripting
baabtra.com - No. 1 supplier of quality freshers
 
Ado.Net Tutorial
prabhu rajendran
 
ASP.NET Page Life Cycle
Abhishek Sur
 
Java rmi
kamal kotecha
 
JDBC: java DataBase connectivity
Tanmoy Barman
 
Server Controls of ASP.Net
Hitesh Santani
 
Eclipse introduction IDE PRESENTATION
AYESHA JAVED
 
Web Engineering
Muhammad Muzammal
 
Form Validation in JavaScript
Ravi Bhadauria
 
Common language runtime clr
SanSan149
 
Ppt of web development
bethanygfair
 
Master pages
teach4uin
 
Introduction to .net framework
Arun Prasad
 
Asp.net architecture
Iblesoft
 
Scripting languages
teach4uin
 
vb.net Constructor and destructor
suraj pandey
 

Viewers also liked (18)

PDF
Asp dot net final (2)
Amelina Ahmeti
 
PPTX
Developing an aspnet web application
Rahul Bansal
 
PPT
ASP.NET Session 6
Sisir Ghosh
 
PPTX
Ch 04 asp.net application
Madhuri Kavade
 
PPTX
Ch06 ado.net fundamentals
Madhuri Kavade
 
PPS
Vb.net session 05
Niit Care
 
PPTX
ASP.NET Presentation
Rasel Khan
 
PPTX
Monitoring web application response times, a new approach
Mark Friedman
 
PPT
The complete ASP.NET (IIS) Tutorial with code example in power point slide show
Subhas Malik
 
PPTX
ASP.NET Best Practices - Useful Tips from the Trenches
Habeeb Rushdan
 
PDF
Introduction to asp.net
SHADAB ALI
 
PPSX
ASP.NET Web form
Md. Mahedee Hasan
 
PPSX
DITEC - E-Commerce & ASP.NET
Rasan Samarasinghe
 
PPTX
ASP.NET Core Security
Albert Weinert
 
PPSX
DITEC - Programming with Java
Rasan Samarasinghe
 
PPT
Be project ppt asp.net
Sanket Jagare
 
PPTX
Writing clean code in C# and .NET
Dror Helper
 
PPTX
IPSec and VPN
Abdullaziz Tagawy
 
Asp dot net final (2)
Amelina Ahmeti
 
Developing an aspnet web application
Rahul Bansal
 
ASP.NET Session 6
Sisir Ghosh
 
Ch 04 asp.net application
Madhuri Kavade
 
Ch06 ado.net fundamentals
Madhuri Kavade
 
Vb.net session 05
Niit Care
 
ASP.NET Presentation
Rasel Khan
 
Monitoring web application response times, a new approach
Mark Friedman
 
The complete ASP.NET (IIS) Tutorial with code example in power point slide show
Subhas Malik
 
ASP.NET Best Practices - Useful Tips from the Trenches
Habeeb Rushdan
 
Introduction to asp.net
SHADAB ALI
 
ASP.NET Web form
Md. Mahedee Hasan
 
DITEC - E-Commerce & ASP.NET
Rasan Samarasinghe
 
ASP.NET Core Security
Albert Weinert
 
DITEC - Programming with Java
Rasan Samarasinghe
 
Be project ppt asp.net
Sanket Jagare
 
Writing clean code in C# and .NET
Dror Helper
 
IPSec and VPN
Abdullaziz Tagawy
 
Ad

Similar to Introduction to asp.net (20)

PPTX
Introduction to asp
Madhuri Kavade
 
PDF
Asp-net
Nina Sales
 
DOC
Asp.Net Tutorials
Ram Sagar Mourya
 
PPT
Intro To Asp Net And Web Forms
SAMIR BHOGAYTA
 
PPT
Intro to asp.net
Information Technology
 
PPTX
ASP.pptx
SwapnilPawar483968
 
PDF
Chapter 1 (asp.net over view)
let's go to study
 
PDF
Introductionto asp net-ppt
tmasyam
 
PDF
ASP.NET Unit-2.pdf
abiraman7
 
PDF
Asp .net web form fundamentals
Gopal Ji Singh
 
PPTX
Lect02_Asp.NET.pptx
SwapnilPawar483968
 
PPT
Introduction to ASP.net. It provides basic introduction
ssuserbf6ebe
 
PPT
introaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.ppt
AvijitChaudhuri3
 
PPT
introaspnet.ppt
asmachehbi
 
PPT
introaspnet.ppt
IbrahimBurhan6
 
PPTX
Aspnet architecture
phantrithuc
 
PPT
This is the introduction to Asp.Net Using C# Introduction Variables State Man...
sagar490070
 
PPT
INTRODUCTION TO ASP.NET COMPLETE MATERIALCOURSE
passtime0530
 
PPTX
Web development using asp.net
Jagrit Vishwakarma
 
PPT
Aspintro
ambar chakraborty
 
Introduction to asp
Madhuri Kavade
 
Asp-net
Nina Sales
 
Asp.Net Tutorials
Ram Sagar Mourya
 
Intro To Asp Net And Web Forms
SAMIR BHOGAYTA
 
Intro to asp.net
Information Technology
 
Chapter 1 (asp.net over view)
let's go to study
 
Introductionto asp net-ppt
tmasyam
 
ASP.NET Unit-2.pdf
abiraman7
 
Asp .net web form fundamentals
Gopal Ji Singh
 
Lect02_Asp.NET.pptx
SwapnilPawar483968
 
Introduction to ASP.net. It provides basic introduction
ssuserbf6ebe
 
introaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.ppt
AvijitChaudhuri3
 
introaspnet.ppt
asmachehbi
 
introaspnet.ppt
IbrahimBurhan6
 
Aspnet architecture
phantrithuc
 
This is the introduction to Asp.Net Using C# Introduction Variables State Man...
sagar490070
 
INTRODUCTION TO ASP.NET COMPLETE MATERIALCOURSE
passtime0530
 
Web development using asp.net
Jagrit Vishwakarma
 
Ad

Recently uploaded (20)

PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PPTX
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
PPTX
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 

Introduction to asp.net

  • 2. What is ASP? • ASP stands for Active Server Pages • ASP is a Microsoft Technology • ASP is a program that runs inside a web server • An ASP file is just the same as an HTML file • An ASP file can contain server scripts in addition to HTML • Server scripts in an ASP file are executed on the server
  • 4. • ASP.NET is an open-source server-side web application framework designed for web development to produce dynamic web pages. • It was developed by Microsoft to allow programmers to build dynamic web sites, web applications and web services. ASP.NET
  • 5. ASP.NET Benefits • Separate Presentation from code • Object Oriented Approach • Event Driven Architecture • Code Compilation • Built in State Management • Many others (data binding, validation, master page etc…)
  • 6. ASP.NET Execution • ASP.NET Applications are executed via sequence of HTTP Requests and HTTP Responses
  • 7. • Client Browser request ASPX pages • The webserver executes the ASPX page and produce html + css + javascript Using ASP.NET • Simple Web Pages • Web Forms • MVC (model view controller) • SignalR
  • 8. ASP.NET Working Traditional web pages • Consist of static html, images, styles etc. • Execute code on the client side • Simple operations ASP.NET Webforms • Execute code on the server side • Database access • Dynamic Pages • High Security level
  • 9. Separate Presentation from code In traditional web development, HTML and programming code in one file • Hard to read, understand • Hard to test and debug ASP.NET Splits web pages into two parts: • .aspx file containing HTML • Code-behind file contain the presentation logic for the particular page
  • 11. Steps to create simple ASP.NET Application 1.Start Visual Studio 2.Create “New website” 3.Add 2 text fields, 1 label, 1 button 4.Double click on the button 5.Add code to add numbers entered in text fields 6.Display the result in the label
  • 12. ASP.NET Base Components • Web Forms – Deliver ASP.NET user interface • Web Control – the components the we can use in our web application (eg:textbox) • “Code-behind” – contains the server side code • Web.config – Contains ASP.NET application configuration • Machine.config – contains configurations for all applications in the server • Global.asax – class containing application level event handlers
  • 13. ASP.NET Web Controls ASP.NET Web controls are the smallest component part Deliver fast and easy component-oriented development process HTML abstraction, but finally everything is HTML <form runat="server" ID="frmMain"> <asp:button runat="server" ID="btn" Text="Click me!" OnClick="btn_Click" /> </form>
  • 14. Web.config Main settings and configuration file for ASP.NET Text based XML document Defines: Connection strings to any DB used by app The default language for child pages Whether debugging is allowed
  • 15. Global.asax Also known as ASP.NET application file Located in the Web application root folder Exposes application and session level events Application_Start Application_End Session_Start Session_End etc…
  • 16. ASP.NET Execution model • First call to a page
  • 17. ASP.NET Execution model • Any other call after first
  • 19. Writing code in an ASP.NET Web form is done in three ways: Mixed code method Inline code method Code-behind method
  • 20. Mixed Code Method The code is in the same file as the web content, mixed with the HTML code This method is not recommended as the source code is hard to read and maintain Inline Code Method The code is separated in a SCRIPT section in the same file Code-Behind Method A separate compiled file containing the program logic of the page Each web page has its own code-behind page Has the same name as the web page to which it is attached The file extension is .aspx.cs The two files are built into one when the application is started