SlideShare a Scribd company logo
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

Asp.net and .Net Framework ppt presentation
Asp.net and .Net Framework ppt presentationAsp.net and .Net Framework ppt presentation
Asp.net and .Net Framework ppt presentation
abhishek singh
 
Asp.net basic
Asp.net basicAsp.net basic
Asp.net basic
Neelesh Shukla
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.net
SHADAB ALI
 
Introduction To Dotnet
Introduction To DotnetIntroduction To Dotnet
Introduction To Dotnet
SAMIR BHOGAYTA
 
Developing an ASP.NET Web Application
Developing an ASP.NET Web ApplicationDeveloping an ASP.NET Web Application
Developing an ASP.NET Web Application
Rishi Kothari
 
ASP.NET Lecture 1
ASP.NET Lecture 1ASP.NET Lecture 1
ASP.NET Lecture 1
Julie Iskander
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
Andres Baravalle
 
Express js
Express jsExpress js
Express js
Manav Prasad
 
Active Server Page(ASP)
Active Server Page(ASP)Active Server Page(ASP)
Active Server Page(ASP)Keshab Nath
 
ASP.NET - Life cycle of asp
ASP.NET - Life cycle of aspASP.NET - Life cycle of asp
ASP.NET - Life cycle of asp
priya Nithya
 
Asp.net state management
Asp.net state managementAsp.net state management
Asp.net state management
priya Nithya
 
Server Controls of ASP.Net
Server Controls of ASP.NetServer Controls of ASP.Net
Server Controls of ASP.Net
Hitesh Santani
 
servlet in java
servlet in javaservlet in java
servlet in java
sowfi
 
ASP.NET State management
ASP.NET State managementASP.NET State management
ASP.NET State management
Shivanand Arur
 
Expressjs
ExpressjsExpressjs
android layouts
android layoutsandroid layouts
android layoutsDeepa Rani
 
Jsp ppt
Jsp pptJsp ppt
Jsp ppt
Vikas Jagtap
 
Spring MVC Framework
Spring MVC FrameworkSpring MVC Framework
Spring MVC Framework
Hùng Nguyễn Huy
 
Asp.net html server control
Asp.net html  server controlAsp.net html  server control
Asp.net html server control
Sireesh K
 

What's hot (20)

Asp.net and .Net Framework ppt presentation
Asp.net and .Net Framework ppt presentationAsp.net and .Net Framework ppt presentation
Asp.net and .Net Framework ppt presentation
 
Web forms in ASP.net
Web forms in ASP.netWeb forms in ASP.net
Web forms in ASP.net
 
Asp.net basic
Asp.net basicAsp.net basic
Asp.net basic
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.net
 
Introduction To Dotnet
Introduction To DotnetIntroduction To Dotnet
Introduction To Dotnet
 
Developing an ASP.NET Web Application
Developing an ASP.NET Web ApplicationDeveloping an ASP.NET Web Application
Developing an ASP.NET Web Application
 
ASP.NET Lecture 1
ASP.NET Lecture 1ASP.NET Lecture 1
ASP.NET Lecture 1
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Express js
Express jsExpress js
Express js
 
Active Server Page(ASP)
Active Server Page(ASP)Active Server Page(ASP)
Active Server Page(ASP)
 
ASP.NET - Life cycle of asp
ASP.NET - Life cycle of aspASP.NET - Life cycle of asp
ASP.NET - Life cycle of asp
 
Asp.net state management
Asp.net state managementAsp.net state management
Asp.net state management
 
Server Controls of ASP.Net
Server Controls of ASP.NetServer Controls of ASP.Net
Server Controls of ASP.Net
 
servlet in java
servlet in javaservlet in java
servlet in java
 
ASP.NET State management
ASP.NET State managementASP.NET State management
ASP.NET State management
 
Expressjs
ExpressjsExpressjs
Expressjs
 
android layouts
android layoutsandroid layouts
android layouts
 
Jsp ppt
Jsp pptJsp ppt
Jsp ppt
 
Spring MVC Framework
Spring MVC FrameworkSpring MVC Framework
Spring MVC Framework
 
Asp.net html server control
Asp.net html  server controlAsp.net html  server control
Asp.net html server control
 

Viewers also liked

Asp dot net final (2)
Asp dot net   final (2)Asp dot net   final (2)
Asp dot net final (2)
Amelina Ahmeti
 
Developing an aspnet web application
Developing an aspnet web applicationDeveloping an aspnet web application
Developing an aspnet web applicationRahul Bansal
 
ASP.NET Session 6
ASP.NET Session 6ASP.NET Session 6
ASP.NET Session 6Sisir Ghosh
 
Ch 04 asp.net application
Ch 04 asp.net application Ch 04 asp.net application
Ch 04 asp.net application Madhuri Kavade
 
Ch06 ado.net fundamentals
Ch06 ado.net fundamentalsCh06 ado.net fundamentals
Ch06 ado.net fundamentalsMadhuri Kavade
 
Vb.net session 05
Vb.net session 05Vb.net session 05
Vb.net session 05Niit Care
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
Rasel Khan
 
Monitoring web application response times, a new approach
Monitoring web application response times, a new approachMonitoring web application response times, a new approach
Monitoring web application response times, a new approach
Mark Friedman
 
The complete ASP.NET (IIS) Tutorial with code example in power point slide show
The complete ASP.NET (IIS) Tutorial with code example in power point slide showThe complete ASP.NET (IIS) Tutorial with code example in power point slide show
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
ASP.NET Best Practices - Useful Tips from the TrenchesASP.NET Best Practices - Useful Tips from the Trenches
ASP.NET Best Practices - Useful Tips from the Trenches
Habeeb Rushdan
 
DITEC - E-Commerce & ASP.NET
DITEC - E-Commerce & ASP.NETDITEC - E-Commerce & ASP.NET
DITEC - E-Commerce & ASP.NET
Rasan Samarasinghe
 
ASP.NET Core Security
ASP.NET Core SecurityASP.NET Core Security
ASP.NET Core Security
Albert Weinert
 
DITEC - Programming with Java
DITEC - Programming with JavaDITEC - Programming with Java
DITEC - Programming with Java
Rasan Samarasinghe
 
Be project ppt asp.net
Be project ppt asp.netBe project ppt asp.net
Be project ppt asp.net
Sanket Jagare
 
Writing clean code in C# and .NET
Writing clean code in C# and .NETWriting clean code in C# and .NET
Writing clean code in C# and .NET
Dror Helper
 
IPSec and VPN
IPSec and VPNIPSec and VPN
IPSec and VPN
Abdullaziz Tagawy
 

Viewers also liked (16)

Asp dot net final (2)
Asp dot net   final (2)Asp dot net   final (2)
Asp dot net final (2)
 
Developing an aspnet web application
Developing an aspnet web applicationDeveloping an aspnet web application
Developing an aspnet web application
 
ASP.NET Session 6
ASP.NET Session 6ASP.NET Session 6
ASP.NET Session 6
 
Ch 04 asp.net application
Ch 04 asp.net application Ch 04 asp.net application
Ch 04 asp.net application
 
Ch06 ado.net fundamentals
Ch06 ado.net fundamentalsCh06 ado.net fundamentals
Ch06 ado.net fundamentals
 
Vb.net session 05
Vb.net session 05Vb.net session 05
Vb.net session 05
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
Monitoring web application response times, a new approach
Monitoring web application response times, a new approachMonitoring web application response times, a new approach
Monitoring web application response times, a new approach
 
The complete ASP.NET (IIS) Tutorial with code example in power point slide show
The complete ASP.NET (IIS) Tutorial with code example in power point slide showThe complete ASP.NET (IIS) Tutorial with code example in power point slide show
The complete ASP.NET (IIS) Tutorial with code example in power point slide show
 
ASP.NET Best Practices - Useful Tips from the Trenches
ASP.NET Best Practices - Useful Tips from the TrenchesASP.NET Best Practices - Useful Tips from the Trenches
ASP.NET Best Practices - Useful Tips from the Trenches
 
DITEC - E-Commerce & ASP.NET
DITEC - E-Commerce & ASP.NETDITEC - E-Commerce & ASP.NET
DITEC - E-Commerce & ASP.NET
 
ASP.NET Core Security
ASP.NET Core SecurityASP.NET Core Security
ASP.NET Core Security
 
DITEC - Programming with Java
DITEC - Programming with JavaDITEC - Programming with Java
DITEC - Programming with Java
 
Be project ppt asp.net
Be project ppt asp.netBe project ppt asp.net
Be project ppt asp.net
 
Writing clean code in C# and .NET
Writing clean code in C# and .NETWriting clean code in C# and .NET
Writing clean code in C# and .NET
 
IPSec and VPN
IPSec and VPNIPSec and VPN
IPSec and VPN
 

Similar to Introduction to asp.net

introasp_net-7364068.ppt
introasp_net-7364068.pptintroasp_net-7364068.ppt
introasp_net-7364068.pptIQM123
 
introasp_net-6563550.ppt
introasp_net-6563550.pptintroasp_net-6563550.ppt
introasp_net-6563550.pptIQM123
 
Asp.net architecture
Asp.net architectureAsp.net architecture
Asp.net architectureIblesoft
 
introaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.ppt
introaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.pptintroaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.ppt
introaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.ppt
AvijitChaudhuri3
 
introaspnet.ppt
introaspnet.pptintroaspnet.ppt
introaspnet.ppt
asmachehbi
 
introaspnet.ppt
introaspnet.pptintroaspnet.ppt
introaspnet.ppt
IbrahimBurhan6
 
introaspnet-5856912.ppt
introaspnet-5856912.pptintroaspnet-5856912.ppt
introaspnet-5856912.pptIQM123
 
introaspnet-3030384.ppt
introaspnet-3030384.pptintroaspnet-3030384.ppt
introaspnet-3030384.pptIQM123
 
Intro To Asp Net And Web Forms
Intro To Asp Net And Web FormsIntro To Asp Net And Web Forms
Intro To Asp Net And Web Forms
SAMIR BHOGAYTA
 
Asp.netrole
Asp.netroleAsp.netrole
Asp.netrole
mani bhushan
 
Asp.net server controls
Asp.net server controlsAsp.net server controls
Asp.net server controlsRaed Aldahdooh
 
Asp dot net final (1)
Asp dot net   final (1)Asp dot net   final (1)
Asp dot net final (1)amelinaahmeti
 

Similar to Introduction to asp.net (20)

Introaspnet
IntroaspnetIntroaspnet
Introaspnet
 
Aspintro
AspintroAspintro
Aspintro
 
introasp_net-7364068.ppt
introasp_net-7364068.pptintroasp_net-7364068.ppt
introasp_net-7364068.ppt
 
introasp_net-6563550.ppt
introasp_net-6563550.pptintroasp_net-6563550.ppt
introasp_net-6563550.ppt
 
Asp.net architecture
Asp.net architectureAsp.net architecture
Asp.net architecture
 
introaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.ppt
introaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.pptintroaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.ppt
introaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.ppt
 
introaspnet.ppt
introaspnet.pptintroaspnet.ppt
introaspnet.ppt
 
introaspnet.ppt
introaspnet.pptintroaspnet.ppt
introaspnet.ppt
 
introaspnet-5856912.ppt
introaspnet-5856912.pptintroaspnet-5856912.ppt
introaspnet-5856912.ppt
 
introaspnet-3030384.ppt
introaspnet-3030384.pptintroaspnet-3030384.ppt
introaspnet-3030384.ppt
 
Introduction to asp
Introduction to aspIntroduction to asp
Introduction to asp
 
Intro To Asp Net And Web Forms
Intro To Asp Net And Web FormsIntro To Asp Net And Web Forms
Intro To Asp Net And Web Forms
 
Learn ASP
Learn ASPLearn ASP
Learn ASP
 
Asp.netrole
Asp.netroleAsp.netrole
Asp.netrole
 
Asp.net server controls
Asp.net server controlsAsp.net server controls
Asp.net server controls
 
Asp.net
 Asp.net Asp.net
Asp.net
 
Asp-net
 Asp-net Asp-net
Asp-net
 
Asp dot net long
Asp dot net longAsp dot net long
Asp dot net long
 
Asp dot net final (1)
Asp dot net   final (1)Asp dot net   final (1)
Asp dot net final (1)
 
Asp dot net final (1)
Asp dot net   final (1)Asp dot net   final (1)
Asp dot net final (1)
 

Recently uploaded

Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
Jelle | Nordend
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
KrzysztofKkol1
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Hivelance Technology
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
Peter Caitens
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 

Recently uploaded (20)

Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 

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