SlideShare a Scribd company logo
1 of 32
ASP.NET
Active Server Pages
PRATIK TAMBEKAR
(Sr. Software Developer at Ensivo Solutions Pvt. Ltd.)
What is ASP.Net?
• ASP.Net is a web development platform provided by
Microsoft. It is used for creating web-based
applications. ASP.Net was first released in the year
2002.
• The first version of ASP.Net deployed was 1.0. The most
recent version of ASP.Net is version 4.6. ASP.Net is
designed to work with the HTTP protocol. This is the
standard protocol used across all web applications.
• ASP.Net applications can also be written in a variety of
.Net languages. These include C#, VB.Net.
ASP.NET Architecture and its
Components
• ASP.Net is a framework which is used to develop
a Web-based application. The basic architecture
of the ASP.Net framework is as shown below.
ASP.NET Architecture Contd..
The architecture of the .Net framework is based on the
following key components
• Language – A variety of languages exists for .NET framework.
They are VB.net and C#. These can be used to develop web
applications.
• Library - The .NET Framework includes a set of standard class
libraries. The most common library used for web applications
in .net is the Web library. The web library has all the necessary
components used to develop .Net web-based applications.
• Common Language Runtime - The Common Language
Infrastructure or CLI is a platform. .Net programs are executed
on this platform. The CLR is used for performing key activities.
Activities include Exception handling and Garbage collection.
Below are some of the key
characteristics of the ASP.Net
framework
• Code Behind Mode
– This is the concept of separation of design and code
– web page called MyPage.aspx. There will be another
file called MyPage.aspx.cs which would denote the
code part of the page
• State Management
• Caching
• ASP.NET and ASP.NET AJAX
• ADO.NET
• Windows Forms
What is ASP.Net Lifecycle?
• When an ASP.Net application is launched,
there are series of steps which are carried
out.
What is ASP.Net Page Lifecycle?
• When an ASP.Net page is called, it goes through a
particular lifecycle. This is done before the
response is sent to the user.
ASP.NET - Environment Setup
Step 1) The first step involves the creation of a new project in
Visual Studio. After launching Visual Studio, you need to
choose the menu option New->Project.
Contd...
Step 2) The next step is to choose the project type as an ASP.Net
Web application. Here we also need to mention the name and
location of our project.
Contd...
Step 3) In the next screen, you have to choose the type of
ASP.net web application that needs to be created. In our case,
we are going to create a simple Web Form application.
Contd...
• If the above steps are followed, you will get
the below output in Visual Studio.
Output:-
Contd...
• Step 4) Now, it's time to add a Web Form file to
the project. This is the file which will contain all
the web-specific code for our project.
Contd...
• Step 5) In the next
screen we are going to
be prompted to provide
a name for the web
form.
• Give a name for the
Web Form. In our case,
we are giving it a name
of Demo.
• Click the Ok button.
Contd...
• Step 6) The next step is to add the code, which
will do the work of displaying "Hello World." This
can be done by just adding one line of code to
the Demo.aspx file.
Page Layout
<!-- directives -->
<% @Page Language="C#" %>
<!-- code section -->
<script runat="server">
private void convertoupper(object sender, EventArgs e)
{
string str = mytext.Value; changed_text.InnerHtml =
str.ToUpper();
}
</script>
Contd...
<!-- Layout -->
<html>
<head>
<title> Change to Upper Case </title>
</head>
<body>
<h3> Conversion to Upper Case </h3>
<form runat="server">
<input runat="server" id="mytext" type="text" />
<input runat="server" id="button1" type="submit"
value="Enter..." OnServerClick="convertoupper"/>
<hr />
<h3> Results: </h3>
<span runat="server" id="changed_text" />
</form>
</body>
</html>
ASP.NET - Event Handling
• An event is an action or occurrence such as a
mouse click, a key press, mouse movements,
or any system-generated notification.
Event Arguments
The general syntax of an event is:
private void EventName (object sender,
EventArgs e){}
Event Handling Using Controls
The ASP tag for a button control:
<asp:Button ID="btnCancel" runat="server"
Text="Cancel" />
<asp:Button ID="btnCancel" runat="server"
Text="Cancel" Onclick="btnCancel_Click" />
ASP.NET Controls:
• ASP.Net has the ability to add controls to a
form such as textboxes and labels.
Step 1) The first step is to open the Forms
Designer for the Demo web form. Once you
do this, you will be able to drag controls from
the toolbox to the Web form.
– To open the Designer web form,
– Right-click the Demo.aspx file in the Solution
Explorer and
– Choose the menu option View Designer.
Contd...
Contd...
• Once you perform the above step, you will be
able to see your Form Designer as shown
below.
Contd...
• Label Control
– The label control is used to display a text or a
message to the user on the form. The label control
is normally used along with other controls.
Contd...
Step 2) Once the label has been added, follow
the following steps.
– Go to the properties window by right-clicking on
the label control
– Choose the Properties menu option
Contd...
Step 3) From the
properties
window,
change the
name of the
Text property
to Name
Contd...
• Similarly, also change
the ID property value
of the control to
lblName. By
specifying a
meaningful ID to
controls, it becomes
easier to access them
during the coding
phase. This is shown
below.
Contd...
• Once you make
the above
changes, you will
see the following
output
Output:-
sum of 2 asp:textbox values using c#
asp.net
First Number: <asp:TextBox runat="server"
id="TB1" /><br />
Second Number: <asp:TextBox runat="server"
id="TB2" /><br />
<asp:Button runat="server" id="CalculateBtn"
OnClick="CalculateBtn_Click" Text="Calcualte
Sum" />
Sum: <asp:TextBox runat="server" id="SumTB" />
Contd...
protected void CalculateBtn_Click (object
sender, EventArgs e)
{
int num1 = Int32.Parse(TB1.Text);
int num2 = Int32.Parse(TB2.Text);
int sum = num1+num2;
SumTB.Text = sum.ToString();
}
Example
simple example has a text box control where
the user can enter name, a button to send
the information to the server, and a label
control to display the URL of the client
computer.
Contd...
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
Inherits="server_side._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div> Enter your name: <br />
<asp:TextBox ID="TextBox1" runat="server">
</asp:TextBox> <asp:Button ID="Button1" runat="server"
OnClick="Button1_Click" Text="Submit" />
<br />
<asp:Label ID="Label1" runat="server"/>
</div>
</form>
</body>
</html>
Contd...
The code behind Button1_Click:
protected void Button1_Click(object sender,
EventArgs e)
{
if (!String.IsNullOrEmpty(TextBox1.Text))
{
Label1.Text = "Welcome, " +
Server.HtmlEncode(TextBox1.Text) + ". <br/> The url is
" + Server.UrlEncode(Request.Url.ToString())
}
}
OR
Response.Write(Label1.Text + "</br>");
THANK YOU!!!!
PRATIK TAMBEKAR
(Sr. Software Developer at Ensivo Solutions Pvt. Ltd.)

More Related Content

What's hot

ASP.NET Session 4
ASP.NET Session 4ASP.NET Session 4
ASP.NET Session 4Sisir Ghosh
 
html 5 new form attribute
html 5 new form attributehtml 5 new form attribute
html 5 new form attributePriyanka Rasal
 
Windows Phone Workshop: WCF services
Windows Phone Workshop: WCF services Windows Phone Workshop: WCF services
Windows Phone Workshop: WCF services Zayen Chagra
 
Angular - Chapter 4 - Data and Event Handling
 Angular - Chapter 4 - Data and Event Handling Angular - Chapter 4 - Data and Event Handling
Angular - Chapter 4 - Data and Event HandlingWebStackAcademy
 
Angular - Chapter 5 - Directives
 Angular - Chapter 5 - Directives Angular - Chapter 5 - Directives
Angular - Chapter 5 - DirectivesWebStackAcademy
 
Forms with html5 (1)
Forms with html5 (1)Forms with html5 (1)
Forms with html5 (1)Anada Kale
 
ASP.NET 05 - Exception Handling And Validation Controls
ASP.NET 05 - Exception Handling And Validation ControlsASP.NET 05 - Exception Handling And Validation Controls
ASP.NET 05 - Exception Handling And Validation ControlsRandy Connolly
 
Dev days Visual Studio 2012 Enhancements
Dev days Visual Studio 2012 EnhancementsDev days Visual Studio 2012 Enhancements
Dev days Visual Studio 2012 EnhancementsAbhishek Sur
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms TutorialProdigyView
 
Debugging Javascript
Debugging JavascriptDebugging Javascript
Debugging JavascriptSolTech, Inc.
 
Building a Blogging System -- Rapidly using Alpha Five v10 with Codeless AJAX...
Building a Blogging System -- Rapidly using Alpha Five v10 with Codeless AJAX...Building a Blogging System -- Rapidly using Alpha Five v10 with Codeless AJAX...
Building a Blogging System -- Rapidly using Alpha Five v10 with Codeless AJAX...Richard Rabins
 
Angular - Chapter 9 - Authentication and Authorization
Angular - Chapter 9 - Authentication and AuthorizationAngular - Chapter 9 - Authentication and Authorization
Angular - Chapter 9 - Authentication and AuthorizationWebStackAcademy
 
Java script
Java scriptJava script
Java scriptITz_1
 
Forms in html5
Forms in html5Forms in html5
Forms in html5hrisi87
 
Less04 2 e_testermodule_3
Less04 2 e_testermodule_3Less04 2 e_testermodule_3
Less04 2 e_testermodule_3Suresh Mishra
 

What's hot (20)

ASP.NET Session 4
ASP.NET Session 4ASP.NET Session 4
ASP.NET Session 4
 
2310 b 03
2310 b 032310 b 03
2310 b 03
 
html 5 new form attribute
html 5 new form attributehtml 5 new form attribute
html 5 new form attribute
 
Windows Phone Workshop: WCF services
Windows Phone Workshop: WCF services Windows Phone Workshop: WCF services
Windows Phone Workshop: WCF services
 
Angular - Chapter 4 - Data and Event Handling
 Angular - Chapter 4 - Data and Event Handling Angular - Chapter 4 - Data and Event Handling
Angular - Chapter 4 - Data and Event Handling
 
Angular - Chapter 5 - Directives
 Angular - Chapter 5 - Directives Angular - Chapter 5 - Directives
Angular - Chapter 5 - Directives
 
Forms with html5 (1)
Forms with html5 (1)Forms with html5 (1)
Forms with html5 (1)
 
Wcf routing kt
Wcf routing ktWcf routing kt
Wcf routing kt
 
Anand june-2012
Anand june-2012Anand june-2012
Anand june-2012
 
ASP.NET 05 - Exception Handling And Validation Controls
ASP.NET 05 - Exception Handling And Validation ControlsASP.NET 05 - Exception Handling And Validation Controls
ASP.NET 05 - Exception Handling And Validation Controls
 
Dev days Visual Studio 2012 Enhancements
Dev days Visual Studio 2012 EnhancementsDev days Visual Studio 2012 Enhancements
Dev days Visual Studio 2012 Enhancements
 
Javascript
JavascriptJavascript
Javascript
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms Tutorial
 
Debugging Javascript
Debugging JavascriptDebugging Javascript
Debugging Javascript
 
Building a Blogging System -- Rapidly using Alpha Five v10 with Codeless AJAX...
Building a Blogging System -- Rapidly using Alpha Five v10 with Codeless AJAX...Building a Blogging System -- Rapidly using Alpha Five v10 with Codeless AJAX...
Building a Blogging System -- Rapidly using Alpha Five v10 with Codeless AJAX...
 
Lesson 1
Lesson 1Lesson 1
Lesson 1
 
Angular - Chapter 9 - Authentication and Authorization
Angular - Chapter 9 - Authentication and AuthorizationAngular - Chapter 9 - Authentication and Authorization
Angular - Chapter 9 - Authentication and Authorization
 
Java script
Java scriptJava script
Java script
 
Forms in html5
Forms in html5Forms in html5
Forms in html5
 
Less04 2 e_testermodule_3
Less04 2 e_testermodule_3Less04 2 e_testermodule_3
Less04 2 e_testermodule_3
 

Similar to ASP DOT NET (20)

ASP.NET Basics
ASP.NET Basics ASP.NET Basics
ASP.NET Basics
 
As pnet
As pnetAs pnet
As pnet
 
Introduction to asp
Introduction to aspIntroduction to asp
Introduction to asp
 
Migration from ASP to ASP.NET
Migration from ASP to ASP.NETMigration from ASP to ASP.NET
Migration from ASP to ASP.NET
 
Java script
Java scriptJava script
Java script
 
ASP.NET Web form
ASP.NET Web formASP.NET Web form
ASP.NET Web form
 
Introduction to VB.Net.pptx
Introduction to VB.Net.pptxIntroduction to VB.Net.pptx
Introduction to VB.Net.pptx
 
Asp.net server controls
Asp.net server controlsAsp.net server controls
Asp.net server controls
 
How to develop asp web applications
How to develop asp web applicationsHow to develop asp web applications
How to develop asp web applications
 
Overview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company indiaOverview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company india
 
introaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.ppt
introaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.pptintroaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.ppt
introaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.ppt
 
introaspnet.ppt
introaspnet.pptintroaspnet.ppt
introaspnet.ppt
 
introaspnet.ppt
introaspnet.pptintroaspnet.ppt
introaspnet.ppt
 
Developing an ASP.NET Web Application
Developing an ASP.NET Web ApplicationDeveloping an ASP.NET Web Application
Developing an ASP.NET Web Application
 
Introaspnet
IntroaspnetIntroaspnet
Introaspnet
 
Aspintro
AspintroAspintro
Aspintro
 
Getting started-with-oracle-so a-iv
Getting started-with-oracle-so a-ivGetting started-with-oracle-so a-iv
Getting started-with-oracle-so a-iv
 
Getting started-with-oracle-so a-iv
Getting started-with-oracle-so a-ivGetting started-with-oracle-so a-iv
Getting started-with-oracle-so a-iv
 
Asp net
Asp netAsp net
Asp net
 
ArduinoWorkshop2.pdf
ArduinoWorkshop2.pdfArduinoWorkshop2.pdf
ArduinoWorkshop2.pdf
 

More from Pratik Tambekar

Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik TambekarPratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik TambekarPratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik TambekarPratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik TambekarPratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik TambekarPratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik TambekarPratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik TambekarPratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik TambekarPratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik TambekarPratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik TambekarPratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik TambekarPratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik TambekarPratik Tambekar
 
Data Mining Concepts and Techniques
Data Mining Concepts and TechniquesData Mining Concepts and Techniques
Data Mining Concepts and TechniquesPratik Tambekar
 
What Is DATA MINING(INTRODUCTION)
What Is DATA MINING(INTRODUCTION)What Is DATA MINING(INTRODUCTION)
What Is DATA MINING(INTRODUCTION)Pratik Tambekar
 
How To Add System Call In Ubuntu OS
How To Add System Call In Ubuntu OSHow To Add System Call In Ubuntu OS
How To Add System Call In Ubuntu OSPratik Tambekar
 

More from Pratik Tambekar (17)

Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Data Mining Concepts and Techniques
Data Mining Concepts and TechniquesData Mining Concepts and Techniques
Data Mining Concepts and Techniques
 
What Is DATA MINING(INTRODUCTION)
What Is DATA MINING(INTRODUCTION)What Is DATA MINING(INTRODUCTION)
What Is DATA MINING(INTRODUCTION)
 
Distributed Transaction
Distributed TransactionDistributed Transaction
Distributed Transaction
 
World Wide Web(WWW)
World Wide Web(WWW)World Wide Web(WWW)
World Wide Web(WWW)
 
How To Add System Call In Ubuntu OS
How To Add System Call In Ubuntu OSHow To Add System Call In Ubuntu OS
How To Add System Call In Ubuntu OS
 

Recently uploaded

Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 

Recently uploaded (20)

Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 

ASP DOT NET

  • 1. ASP.NET Active Server Pages PRATIK TAMBEKAR (Sr. Software Developer at Ensivo Solutions Pvt. Ltd.)
  • 2. What is ASP.Net? • ASP.Net is a web development platform provided by Microsoft. It is used for creating web-based applications. ASP.Net was first released in the year 2002. • The first version of ASP.Net deployed was 1.0. The most recent version of ASP.Net is version 4.6. ASP.Net is designed to work with the HTTP protocol. This is the standard protocol used across all web applications. • ASP.Net applications can also be written in a variety of .Net languages. These include C#, VB.Net.
  • 3. ASP.NET Architecture and its Components • ASP.Net is a framework which is used to develop a Web-based application. The basic architecture of the ASP.Net framework is as shown below.
  • 4. ASP.NET Architecture Contd.. The architecture of the .Net framework is based on the following key components • Language – A variety of languages exists for .NET framework. They are VB.net and C#. These can be used to develop web applications. • Library - The .NET Framework includes a set of standard class libraries. The most common library used for web applications in .net is the Web library. The web library has all the necessary components used to develop .Net web-based applications. • Common Language Runtime - The Common Language Infrastructure or CLI is a platform. .Net programs are executed on this platform. The CLR is used for performing key activities. Activities include Exception handling and Garbage collection.
  • 5. Below are some of the key characteristics of the ASP.Net framework • Code Behind Mode – This is the concept of separation of design and code – web page called MyPage.aspx. There will be another file called MyPage.aspx.cs which would denote the code part of the page • State Management • Caching • ASP.NET and ASP.NET AJAX • ADO.NET • Windows Forms
  • 6. What is ASP.Net Lifecycle? • When an ASP.Net application is launched, there are series of steps which are carried out.
  • 7. What is ASP.Net Page Lifecycle? • When an ASP.Net page is called, it goes through a particular lifecycle. This is done before the response is sent to the user.
  • 8. ASP.NET - Environment Setup Step 1) The first step involves the creation of a new project in Visual Studio. After launching Visual Studio, you need to choose the menu option New->Project.
  • 9. Contd... Step 2) The next step is to choose the project type as an ASP.Net Web application. Here we also need to mention the name and location of our project.
  • 10. Contd... Step 3) In the next screen, you have to choose the type of ASP.net web application that needs to be created. In our case, we are going to create a simple Web Form application.
  • 11. Contd... • If the above steps are followed, you will get the below output in Visual Studio. Output:-
  • 12. Contd... • Step 4) Now, it's time to add a Web Form file to the project. This is the file which will contain all the web-specific code for our project.
  • 13. Contd... • Step 5) In the next screen we are going to be prompted to provide a name for the web form. • Give a name for the Web Form. In our case, we are giving it a name of Demo. • Click the Ok button.
  • 14. Contd... • Step 6) The next step is to add the code, which will do the work of displaying "Hello World." This can be done by just adding one line of code to the Demo.aspx file.
  • 15. Page Layout <!-- directives --> <% @Page Language="C#" %> <!-- code section --> <script runat="server"> private void convertoupper(object sender, EventArgs e) { string str = mytext.Value; changed_text.InnerHtml = str.ToUpper(); } </script>
  • 16. Contd... <!-- Layout --> <html> <head> <title> Change to Upper Case </title> </head> <body> <h3> Conversion to Upper Case </h3> <form runat="server"> <input runat="server" id="mytext" type="text" /> <input runat="server" id="button1" type="submit" value="Enter..." OnServerClick="convertoupper"/> <hr /> <h3> Results: </h3> <span runat="server" id="changed_text" /> </form> </body> </html>
  • 17. ASP.NET - Event Handling • An event is an action or occurrence such as a mouse click, a key press, mouse movements, or any system-generated notification. Event Arguments The general syntax of an event is: private void EventName (object sender, EventArgs e){}
  • 18. Event Handling Using Controls The ASP tag for a button control: <asp:Button ID="btnCancel" runat="server" Text="Cancel" /> <asp:Button ID="btnCancel" runat="server" Text="Cancel" Onclick="btnCancel_Click" />
  • 19. ASP.NET Controls: • ASP.Net has the ability to add controls to a form such as textboxes and labels. Step 1) The first step is to open the Forms Designer for the Demo web form. Once you do this, you will be able to drag controls from the toolbox to the Web form. – To open the Designer web form, – Right-click the Demo.aspx file in the Solution Explorer and – Choose the menu option View Designer.
  • 21. Contd... • Once you perform the above step, you will be able to see your Form Designer as shown below.
  • 22. Contd... • Label Control – The label control is used to display a text or a message to the user on the form. The label control is normally used along with other controls.
  • 23. Contd... Step 2) Once the label has been added, follow the following steps. – Go to the properties window by right-clicking on the label control – Choose the Properties menu option
  • 24. Contd... Step 3) From the properties window, change the name of the Text property to Name
  • 25. Contd... • Similarly, also change the ID property value of the control to lblName. By specifying a meaningful ID to controls, it becomes easier to access them during the coding phase. This is shown below.
  • 26. Contd... • Once you make the above changes, you will see the following output Output:-
  • 27. sum of 2 asp:textbox values using c# asp.net First Number: <asp:TextBox runat="server" id="TB1" /><br /> Second Number: <asp:TextBox runat="server" id="TB2" /><br /> <asp:Button runat="server" id="CalculateBtn" OnClick="CalculateBtn_Click" Text="Calcualte Sum" /> Sum: <asp:TextBox runat="server" id="SumTB" />
  • 28. Contd... protected void CalculateBtn_Click (object sender, EventArgs e) { int num1 = Int32.Parse(TB1.Text); int num2 = Int32.Parse(TB2.Text); int sum = num1+num2; SumTB.Text = sum.ToString(); }
  • 29. Example simple example has a text box control where the user can enter name, a button to send the information to the server, and a label control to display the URL of the client computer.
  • 30. Contd... <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="server_side._Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> Enter your name: <br /> <asp:TextBox ID="TextBox1" runat="server"> </asp:TextBox> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Submit" /> <br /> <asp:Label ID="Label1" runat="server"/> </div> </form> </body> </html>
  • 31. Contd... The code behind Button1_Click: protected void Button1_Click(object sender, EventArgs e) { if (!String.IsNullOrEmpty(TextBox1.Text)) { Label1.Text = "Welcome, " + Server.HtmlEncode(TextBox1.Text) + ". <br/> The url is " + Server.UrlEncode(Request.Url.ToString()) } } OR Response.Write(Label1.Text + "</br>");
  • 32. THANK YOU!!!! PRATIK TAMBEKAR (Sr. Software Developer at Ensivo Solutions Pvt. Ltd.)