SlideShare a Scribd company logo
1 of 20
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)

DOT Net overview
DOT Net overviewDOT Net overview
DOT Net overview
 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET Framework
 
Validation Controls in asp.net
Validation Controls in asp.netValidation Controls in asp.net
Validation Controls in asp.net
 
Oops concept on c#
Oops concept on c#Oops concept on c#
Oops concept on c#
 
.NET and C# Introduction
.NET and C# Introduction.NET and C# Introduction
.NET and C# Introduction
 
Introduction To Dotnet
Introduction To DotnetIntroduction To Dotnet
Introduction To Dotnet
 
C#.NET
C#.NETC#.NET
C#.NET
 
ASP.NET Basics
ASP.NET Basics ASP.NET Basics
ASP.NET Basics
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Asp.net basic
Asp.net basicAsp.net basic
Asp.net basic
 
Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/js
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net framework
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.net
 
JavaScript - Chapter 8 - Objects
 JavaScript - Chapter 8 - Objects JavaScript - Chapter 8 - Objects
JavaScript - Chapter 8 - Objects
 
Asynchronous JavaScript Programming
Asynchronous JavaScript ProgrammingAsynchronous JavaScript Programming
Asynchronous JavaScript Programming
 
javaScript.ppt
javaScript.pptjavaScript.ppt
javaScript.ppt
 
C# programming language
C# programming languageC# programming language
C# programming language
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
 
Servlets
ServletsServlets
Servlets
 

Viewers also liked

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 PresentationRasel 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 approachMark 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 showSubhas 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 TrenchesHabeeb Rushdan
 
Be project ppt asp.net
Be project ppt asp.netBe project ppt asp.net
Be project ppt asp.netSanket 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 .NETDror Helper
 

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.pptAvijitChaudhuri3
 
introaspnet.ppt
introaspnet.pptintroaspnet.ppt
introaspnet.pptasmachehbi
 
introaspnet-3030384.ppt
introaspnet-3030384.pptintroaspnet-3030384.ppt
introaspnet-3030384.pptIQM123
 
introaspnet-5856912.ppt
introaspnet-5856912.pptintroaspnet-5856912.ppt
introaspnet-5856912.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 FormsSAMIR BHOGAYTA
 
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-3030384.ppt
introaspnet-3030384.pptintroaspnet-3030384.ppt
introaspnet-3030384.ppt
 
introaspnet-5856912.ppt
introaspnet-5856912.pptintroaspnet-5856912.ppt
introaspnet-5856912.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

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 

Recently uploaded (20)

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 

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