SlideShare a Scribd company logo
UNIT 1
Introduction to ASP.Net
By: Hitesh Santani
What is Web?
By: Hitesh Santani
• Web is a large and public network with which we can
access the information from anywhere in the world.
• Generally, people call it The Internet.
• The information which is available on web, is in many
forms like text, images, audio and video.
• This information is embedded into web pages through
which we can access them.
What is a Website?
By: Hitesh Santani
 A website is a collection of web pages.
 These web pages are made up of HTML, CSS, Javascript,
jQuery and a server side programming language like
ASP.Net, PHP, JSP, Java Servlets etc.
 A website can only be used using a web browser.
 Example: www.gmail.co.in
How Internet works?
By: Hitesh Santani
Client
Request
HTTPREQUEST
INTERNE
T
HTTP
Request REQUEST
RESPONSEHTTP
Response
HTTPResponse
Response
Server
Database
How Internet works?
By: Hitesh Santani
• A client is a user who wishes to use the website for the info.
• A server is a machine where the actual website is stored. This
server is connected with the internet.
• The clients use a browser or any other HTTP supported
software to communicate with the server through internet.
• HTTP (Hyper Text Transfer Protocol) is a protocol which
governs the rules related to Hyper Text Transmission in
between two machines on a network.
• Whenever, we type in a URL into the address bar of a
browser, an HTTP Request is generated and is sent to the
server.
• The server then processes this request and replays with an
HTTP Response which contains the HTML output.
What is .Net?
By: Hitesh Santani
 First of all, .Net is not a language but it is a framework.
 It is a software platform with which you can create
windows and web applications.
 It provides you all the required features which can make
your work of developing applications easy.
Architecture of .Net
By: Hitesh Santani
VB C#
Common Language Specification (CLS)
ASP .Net
Web
Services
Web Forms
Windows
Forms
ADO .Net and XML
Base Class Library (BCL) or Framework Class Library (FCL)
Common Language Runtime
Operating System
C++ J# ……Language Compilers
.Net
Framework
Language Compilers
By: Hitesh Santani
 There are compilers available separately for each and
every language individually.
 The task being assigned to the compilers for the .Net
framework, is to convert the source code of the
programs into MSIL Code.
Compilation Process in .Net
By: Hitesh Santani
.vb .cs ……
VB
Compiler
C#
Compiler
……
Common Language Runtime (CLR)
Operating System
Source
Code
Source
Code
Source
Code
Native
Code
MSIL Code
MSIL Code
By: Hitesh Santani
• MSIL Code stands for Microsoft Intermediate Language
Code which is also called IL Code.
• This MSIL Code can not be executed by the hardware.
• MSIL Code solves a major problem i.e. creating a
separate compiler for each of the languages to convert
the source code to a particular device type.
• That’s why it is given to the CLR to generate Native
Code (Machine Code) from it.
• This Native Code can be executed by the hardware.
Common Language Specification (CLS)
By: Hitesh Santani
 Common Language Specification (CLS) is a set of rules.
 These rules must be followed by any language which
wants to be .Net compliant and wants to run it’s
programs in CLR.
 CLS is a subset of Common Type System (CTS).
Common Type System (CTS)
By: Hitesh Santani
• Common Type System (CTS) allows program written in
different programming languages to share information easily.
• This means that we can use a class which is written in C# in
VB.Net.
• Languages must agree on these concepts before they can
integrate with one another.
• CTS defines the rules which must be followed by the
languages to ensure smooth data sharing between them.
• Thus, CTS provides Cross Language Integration or Language
Interoperability.
• CTS supports two categories of types: Value types and
Reference types.
By: Hitesh Santani
 Value types:
 Which stores the data directly in stack.
 In built data types come under this category.
 Reference types:
 Which stores the reference or address instead of storing the
data directly.
 This type of data is stored in heap instead of stack.
 Objects are example of this category.
Framework Class Library (FCL)
By: Hitesh Santani
• Framework Class Library (FCL) which is also known as
Base Class Library (BCL), is a set of readily available
classes.
• It is the in built set of classes which we can directly use
on the fly after importing them into the programs.
• These are like the header files which we used to have in
C or C++.
• This class library consists of thousands of classes which
are categorized into namespaces so that we can
remember them easily.
Namespaces
By: Hitesh Santani
• A namespace is a logical collection/grouping of classes.
• It helps us out to categorize the library classes in according to
their purpose.
• Because of the namespaces, we do not have to remember
names of each and every class.
• We just need to remember the name of the namespace to
which the class belongs.
• A namespace is just a logical container for the library classes.
• Namespaces can be used to differentiate two different classes
with the same name using a Fully Qualified Name. A Fully
Qualified Name is a combination of the class name and the
namespace’s name to which the class belongs.
• The topmost namespace in the .Net framework is System.
The rest of the namespaces are a part of the System
namespace.
Common Language Runtime (CLR)
By: Hitesh Santani
• CLR is one of the main components of .Net.
• It’s the execution engine and environment of the
framework.
• It stays in between the .Net framework and the
underlying Operating System.
• It loads and executes the code.
• It provides all the services which the program may need
at run-time.
• Every language that wants it’s programs to run in CLR,
must obey the rules being imposed by CLR.
Compiled Code
By: Hitesh Santani
 In order to serve the request given by the user, ASP.Net
must first compile the code. We can write the ASP.Net
code in any of the languages supported by .Net
framework.
 When we compile the code, it is translated into MSIL
which is language-independent.
 Then this MSIL is converted into machine-specific
instructions.
Benefits of Compiled Code
By: Hitesh Santani
• Stability: When the code is compiled, it is checked for
syntax error, type safety etc so that many errors can be
eliminated from the later stage.
• Performance: The execution of the compiled code is
faster then the scripts such as VBScript.
• Security: Compiled code is difficult to read. So no one
can convert the compiled code back into the source
code.
• Interoperability: We are able to use assemblies written
in different languages as MSIL supports any .Net
languages.
Inline Code (In-Page Code)
By: Hitesh Santani
 Traditional developers were using this approach.
 Client-side and Server-side code is intermixed into a
single page.
 Becomes very difficult to maintain the events and event
handlers in a large single page.
 Its written in the <script> tag.
Code Behind
By: Hitesh Santani
• Separate files are maintained for Client-side and Server-
side code.
• One file contains HTML which is the .aspx file.
• The other file contains the server-side code which is
called Code Behind file. It can be either .vb or .cs.
• Separates the design layout and the coding part.
• At the time of compilation, both files are combined and
one class is generated which is used to serve the user
requests.
Object Oriented Concepts
By: Hitesh Santani
 Class
 Fields
 Properties
 Methods
 Events
 Objects
 Constructors
 Destructors
 Encapsulation
 Inheritance
 Abstraction
 Abstract Class
 Interface
 Polymorphism
 Method Overriding
 Partial Classes
Class
By: Hitesh Santani
 The class is a template through which we can create an
object.
 In .Net, it contains fields, properties, methods
(procedures and functions) and events.
 Syntax:
[Access Modifier] [Shadows] [MustInherit|NotInheritable] Class <name>
[Implements <interfacename>]
Statements
End Class
Fields
By: Hitesh Santani
 They are the variables in the class.
 They can be read or set directly.
 They store the actual data which is being given to an
object.
 Example:
Public Class MyClass
Public x As Integer
End Class
Properties
By: Hitesh Santani
• Properties are retrieved and set like fields.
• They are implemented using Property Get and Property Set
procedures which provide more control on how values are set or
returned.
• Example:
Public Class MyClass
Private Name As String
Public Property FullName() As String
Get
Return Name
End Get
Set(ByVal Value As String)
Name = Value
End Set
End Property
End Class
Methods
By: Hitesh Santani
• Methods represent the object’s built-in procedures.
• For example, a class named Employee may have methods
named CalculateSalary and CalculateLeaves.
• We can defined methods by adding procedures and functions
to the class.
• Example:
Public Class Employee
Public Sub CalculateSalary()
Write(“-------”)
End Sub
Public Sub CalculateLeaves()
Write(“-------”)
End Sub
End Class
Objects
By: Hitesh Santani
 They are the basic runtime entities. They are the
variables of the class.
 It is said to be the instance of the class.
 Example:
Dim obj as MyClass
Constructor
By: Hitesh Santani
 They are the special procedures that are invoked
automatically when an object of a class is created.
 Example:
Public Sub New(ByVal newValue as Integer)
value = newValue
End Sub
Destructor
By: Hitesh Santani
• We know how to create constructor, but what about destructor?
• It is also executed automatically when an object is about to be
destroyed.
• We can place code to clean up the reserved resources in a
destructor.
• In VB.Net, we can use the Finalize method for this purpose. The
Finalize method is called automatically when an object is marked as
unusable and is to be destroyed.
• Example:
Public Class MyClass
Protected Overrides Sub Finalize()
Statements
End Sub
End Class
Encapsulation
By: Hitesh Santani
• The process of combining data members and methods in
a single unit is called Encapsulation.
• When using Data Encapsulation, data is not accessed
directly, it is only accessible through the functions
available within the class.
• Data Encapsulation enables the important concept of
Data Hiding.
• Protecting data from unauthorized access is called Data
Hiding.
Inheritance
By: Hitesh Santani
• It is the process by which object of one class acquires the
properties (members) of another class.
• It’s the process of forming a new class from an existing
class.
• The existing class is called a parent/super/base class.
• The new class is called child/sub/derived class.
• It is important because it supports hierarchical
classification and code reusability.
• We can add new features to a class without even
touching it by deriving a new class.
• To inherit the class, Inherits keyword is used with the
derived class.
By: Hitesh Santani
 Example:
Public Class Person
‘Members of Person class
End Class
Public Class Employee Inherits Person
‘Members of Employee class
End Class
Abstraction
By: Hitesh Santani
 It is a mechanism of representing essential features
without including background details.
 Data Abstraction increases the power of programming
language by creating user defined data types.
 When the classes use the concept of data abstraction,
they are also known as Abstract Data Types (ADT).
Abstract Class
By: Hitesh Santani
 MustInherit keyword is used to declare a class that
cannot be instantiated and can be used only as a base
class.
 It is also called an Abstract Base Class (ABC).
Interface
By: Hitesh Santani
• Example:
Public Interface person
Sub SetName(ByVal PersonName As String)
Function GetName() As String
End Interface
Public Class employee Implements person
Dim Name As String
Sub SetName(ByVal PersonName As String) Implements person.SetName
Name = PersonName
End Sub
Function GetName() As String Implements person.GetName
Return Name
End Function
End Class
Polymorphism
By: Hitesh Santani
 Poly means many and morphism means forms i.e. one
name many forms.
 The ability of functions and operators to act in different
ways on different data types is called polymorphism.
 To use one function name for many different purposes is
known as function overloading.
 Overloads keyword is used.
By: Hitesh Santani
• Example:
Overloads Function Add(ByVal a1 As Integer, ByVal a2 As
Integer) As Integer
Return a1+a2
End Function
Overloads Function Add(ByVal a1 As Integer, ByVal a2 As
Integer, ByVal a3 As Integer) As Integer
Return a1+a2+a3
End Function
Method Overriding
By: Hitesh Santani
 The process in which a subclass provide a specific
implementation of a method, that is already provided by
one of its super classes is called Method Overriding.
 The implementation in the subclass overrides (replaces)
the implementation in the superclass.
By: Hitesh Santani
• Following keywords are for method overriding:
– Overridable: Allows a property or method in a class to be
overridden.
– Overrides: Overrides an Overridable property or method.
– NotOverridable: Prevents a property or method from being
overridden. Public methods are NotOverridable by default.
– MustOverride: Requires that a derived class override the
property or method. MustOverride methods must be declared
in MustInherit classes.
Event Driven Programming
By: Hitesh Santani
Event Driven Programming
By: Hitesh Santani
• Event: An event is a user action which he/she has
performed for a purpose. Examples are clicking or double
clicking a button, typing a character, hovering mouse
pointer etc.
• Event Source: An event source is an element on the
screen on which the user performs the action which
triggers the event.
• Event Handler: An event handler is a set of statements
which has been written to handle a specific event.
• Event Dispatcher: This is the module which handles all
the triggered events and calls the appropriate event
handler function.
Any Questions in this unit?
By: Hitesh Santani
Ad

More Related Content

What's hot (20)

JAVA Object Oriented Programming (OOP)
JAVA Object Oriented Programming (OOP)JAVA Object Oriented Programming (OOP)
JAVA Object Oriented Programming (OOP)
Prof. Erwin Globio
 
Ppt of c vs c#
Ppt of c vs c#Ppt of c vs c#
Ppt of c vs c#
shubhra chauhan
 
C++ vs C#
C++ vs C#C++ vs C#
C++ vs C#
sudipv
 
성능 최대화를 위한 CloudFront 설정 Best Practice
성능 최대화를 위한 CloudFront 설정 Best Practice성능 최대화를 위한 CloudFront 설정 Best Practice
성능 최대화를 위한 CloudFront 설정 Best Practice
GS Neotek
 
DOT Net overview
DOT Net overviewDOT Net overview
DOT Net overview
chandrasekhardesireddi
 
Struts framework
Struts frameworkStruts framework
Struts framework
baabtra.com - No. 1 supplier of quality freshers
 
JSON: The Basics
JSON: The BasicsJSON: The Basics
JSON: The Basics
Jeff Fox
 
Android resource
Android resourceAndroid resource
Android resource
Krazy Koder
 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET Framework
Raghuveer Guthikonda
 
Presentation evernote
Presentation evernotePresentation evernote
Presentation evernote
JennGColl24
 
Structure in c#
Structure in c#Structure in c#
Structure in c#
Dr.Neeraj Kumar Pandey
 
Ilmu Pembelajaran_Zuhkhriyan Zakaria [Autosaved].pptx
Ilmu Pembelajaran_Zuhkhriyan Zakaria [Autosaved].pptxIlmu Pembelajaran_Zuhkhriyan Zakaria [Autosaved].pptx
Ilmu Pembelajaran_Zuhkhriyan Zakaria [Autosaved].pptx
Universitas Islam Malang
 
Scripting Languages
Scripting LanguagesScripting Languages
Scripting Languages
Forrester High School
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net framework
Arun Prasad
 
Visual Studio IDE
Visual Studio IDEVisual Studio IDE
Visual Studio IDE
Sayantan Sur
 
Core Java
Core JavaCore Java
Core Java
Priyanka Pradhan
 
Linux Introduction (Commands)
Linux Introduction (Commands)Linux Introduction (Commands)
Linux Introduction (Commands)
anandvaidya
 
Introduction to Shell script
Introduction to Shell scriptIntroduction to Shell script
Introduction to Shell script
Bhavesh Padharia
 
Db2をAWS上に構築する際のヒント&TIPS 2019年7月版
Db2をAWS上に構築する際のヒント&TIPS 2019年7月版Db2をAWS上に構築する際のヒント&TIPS 2019年7月版
Db2をAWS上に構築する際のヒント&TIPS 2019年7月版
Akira Shimosako
 
Linux
LinuxLinux
Linux
shamxsa
 

Viewers also liked (13)

Data compression
Data compressionData compression
Data compression
Sherif Abdelfattah
 
Jsp Introduction Tutorial
Jsp Introduction TutorialJsp Introduction Tutorial
Jsp Introduction Tutorial
APSMIND TECHNOLOGY PVT LTD.
 
Data compression introduction
Data compression introductionData compression introduction
Data compression introduction
Rahul Khanwani
 
Data compression
Data compression Data compression
Data compression
Muhammad Irtiza
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework Overview
Doncho Minkov
 
Compression techniques
Compression techniquesCompression techniques
Compression techniques
m_divya_bharathi
 
Tabel Dosis N3W Ultimate Power Pada Bensin Pertalite
Tabel Dosis N3W Ultimate Power Pada Bensin PertaliteTabel Dosis N3W Ultimate Power Pada Bensin Pertalite
Tabel Dosis N3W Ultimate Power Pada Bensin Pertalite
Ridwan Soleh Nata
 
Mysore
MysoreMysore
Mysore
Sunil Kumar N
 
Python 入門初體驗(程式語法)
Python 入門初體驗(程式語法)Python 入門初體驗(程式語法)
Python 入門初體驗(程式語法)
政斌 楊
 
по лесным тропинкам 2
по лесным тропинкам 2по лесным тропинкам 2
по лесным тропинкам 2
yakushenkova
 
Biodata
BiodataBiodata
Biodata
Fitry Tyas
 
อภัยกูเถิด
อภัยกูเถิดอภัยกูเถิด
อภัยกูเถิด
I'Pai Parichat
 
Organ donation
Organ donationOrgan donation
Organ donation
Vasavi Vedagiri
 
Data compression introduction
Data compression introductionData compression introduction
Data compression introduction
Rahul Khanwani
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework Overview
Doncho Minkov
 
Tabel Dosis N3W Ultimate Power Pada Bensin Pertalite
Tabel Dosis N3W Ultimate Power Pada Bensin PertaliteTabel Dosis N3W Ultimate Power Pada Bensin Pertalite
Tabel Dosis N3W Ultimate Power Pada Bensin Pertalite
Ridwan Soleh Nata
 
Python 入門初體驗(程式語法)
Python 入門初體驗(程式語法)Python 入門初體驗(程式語法)
Python 入門初體驗(程式語法)
政斌 楊
 
по лесным тропинкам 2
по лесным тропинкам 2по лесным тропинкам 2
по лесным тропинкам 2
yakushenkova
 
อภัยกูเถิด
อภัยกูเถิดอภัยกูเถิด
อภัยกูเถิด
I'Pai Parichat
 
Ad

Similar to Introduction to .Net (20)

DOT NET Framework.pptxdsfdsfdsfsdfdsfdsfdsf
DOT NET Framework.pptxdsfdsfdsfsdfdsfdsfdsfDOT NET Framework.pptxdsfdsfdsfsdfdsfdsfdsf
DOT NET Framework.pptxdsfdsfdsfsdfdsfdsfdsf
zmulani8
 
Dot net
Dot netDot net
Dot net
public
 
.Net framework
.Net framework.Net framework
.Net framework
baabtra.com - No. 1 supplier of quality freshers
 
Session2 (3)
Session2 (3)Session2 (3)
Session2 (3)
DrUjwala1
 
Dotnet1
Dotnet1Dotnet1
Dotnet1
Sudhriti Gupta
 
Dotnet interview qa
Dotnet interview qaDotnet interview qa
Dotnet interview qa
abcxyzqaz
 
NETOverview1.ppt c# using asp.net activeX data object and XNL
NETOverview1.ppt c# using asp.net activeX data object and XNLNETOverview1.ppt c# using asp.net activeX data object and XNL
NETOverview1.ppt c# using asp.net activeX data object and XNL
sagar490070
 
ASP.NET Session 2
ASP.NET Session 2ASP.NET Session 2
ASP.NET Session 2
Sisir Ghosh
 
Common language runtime clr
Common language runtime clrCommon language runtime clr
Common language runtime clr
SanSan149
 
.Net framework
.Net framework.Net framework
.Net framework
sanya6900
 
.Net framework components by naveen kumar veligeti
.Net framework components by naveen kumar veligeti.Net framework components by naveen kumar veligeti
.Net framework components by naveen kumar veligeti
Naveen Kumar Veligeti
 
.Net overview|Introduction Of .net
.Net overview|Introduction Of .net.Net overview|Introduction Of .net
.Net overview|Introduction Of .net
pinky singh
 
Part i
Part iPart i
Part i
Mohamed Ebrahim
 
.net Based Component Technologies
.net Based Component Technologies.net Based Component Technologies
.net Based Component Technologies
prakashk453625
 
NETOverview1.ppt
NETOverview1.pptNETOverview1.ppt
NETOverview1.ppt
VivekRaj101435
 
NETOverview1ppt.pptx
NETOverview1ppt.pptxNETOverview1ppt.pptx
NETOverview1ppt.pptx
charusharma165
 
.Net overview
.Net overview.Net overview
.Net overview
teach4uin
 
VB IMPORTANT QUESTION
VB IMPORTANT QUESTIONVB IMPORTANT QUESTION
VB IMPORTANT QUESTION
FAREED UR RAHMAN .
 
C# and dot net framework
C# and dot net frameworkC# and dot net framework
C# and dot net framework
baabtra.com - No. 1 supplier of quality freshers
 
Web Technology Fundamentals
Web Technology FundamentalsWeb Technology Fundamentals
Web Technology Fundamentals
sunmitraeducation
 
Ad

Recently uploaded (20)

EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
AxisTechnolabs
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud PerformanceHow to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
ThousandEyes
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Maxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINKMaxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINK
younisnoman75
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New VersionPixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
saimabibi60507
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
AxisTechnolabs
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud PerformanceHow to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
ThousandEyes
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Maxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINKMaxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINK
younisnoman75
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New VersionPixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
saimabibi60507
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 

Introduction to .Net

  • 1. UNIT 1 Introduction to ASP.Net By: Hitesh Santani
  • 2. What is Web? By: Hitesh Santani • Web is a large and public network with which we can access the information from anywhere in the world. • Generally, people call it The Internet. • The information which is available on web, is in many forms like text, images, audio and video. • This information is embedded into web pages through which we can access them.
  • 3. What is a Website? By: Hitesh Santani  A website is a collection of web pages.  These web pages are made up of HTML, CSS, Javascript, jQuery and a server side programming language like ASP.Net, PHP, JSP, Java Servlets etc.  A website can only be used using a web browser.  Example: www.gmail.co.in
  • 4. How Internet works? By: Hitesh Santani Client Request HTTPREQUEST INTERNE T HTTP Request REQUEST RESPONSEHTTP Response HTTPResponse Response Server Database
  • 5. How Internet works? By: Hitesh Santani • A client is a user who wishes to use the website for the info. • A server is a machine where the actual website is stored. This server is connected with the internet. • The clients use a browser or any other HTTP supported software to communicate with the server through internet. • HTTP (Hyper Text Transfer Protocol) is a protocol which governs the rules related to Hyper Text Transmission in between two machines on a network. • Whenever, we type in a URL into the address bar of a browser, an HTTP Request is generated and is sent to the server. • The server then processes this request and replays with an HTTP Response which contains the HTML output.
  • 6. What is .Net? By: Hitesh Santani  First of all, .Net is not a language but it is a framework.  It is a software platform with which you can create windows and web applications.  It provides you all the required features which can make your work of developing applications easy.
  • 7. Architecture of .Net By: Hitesh Santani VB C# Common Language Specification (CLS) ASP .Net Web Services Web Forms Windows Forms ADO .Net and XML Base Class Library (BCL) or Framework Class Library (FCL) Common Language Runtime Operating System C++ J# ……Language Compilers .Net Framework
  • 8. Language Compilers By: Hitesh Santani  There are compilers available separately for each and every language individually.  The task being assigned to the compilers for the .Net framework, is to convert the source code of the programs into MSIL Code.
  • 9. Compilation Process in .Net By: Hitesh Santani .vb .cs …… VB Compiler C# Compiler …… Common Language Runtime (CLR) Operating System Source Code Source Code Source Code Native Code MSIL Code
  • 10. MSIL Code By: Hitesh Santani • MSIL Code stands for Microsoft Intermediate Language Code which is also called IL Code. • This MSIL Code can not be executed by the hardware. • MSIL Code solves a major problem i.e. creating a separate compiler for each of the languages to convert the source code to a particular device type. • That’s why it is given to the CLR to generate Native Code (Machine Code) from it. • This Native Code can be executed by the hardware.
  • 11. Common Language Specification (CLS) By: Hitesh Santani  Common Language Specification (CLS) is a set of rules.  These rules must be followed by any language which wants to be .Net compliant and wants to run it’s programs in CLR.  CLS is a subset of Common Type System (CTS).
  • 12. Common Type System (CTS) By: Hitesh Santani • Common Type System (CTS) allows program written in different programming languages to share information easily. • This means that we can use a class which is written in C# in VB.Net. • Languages must agree on these concepts before they can integrate with one another. • CTS defines the rules which must be followed by the languages to ensure smooth data sharing between them. • Thus, CTS provides Cross Language Integration or Language Interoperability. • CTS supports two categories of types: Value types and Reference types.
  • 13. By: Hitesh Santani  Value types:  Which stores the data directly in stack.  In built data types come under this category.  Reference types:  Which stores the reference or address instead of storing the data directly.  This type of data is stored in heap instead of stack.  Objects are example of this category.
  • 14. Framework Class Library (FCL) By: Hitesh Santani • Framework Class Library (FCL) which is also known as Base Class Library (BCL), is a set of readily available classes. • It is the in built set of classes which we can directly use on the fly after importing them into the programs. • These are like the header files which we used to have in C or C++. • This class library consists of thousands of classes which are categorized into namespaces so that we can remember them easily.
  • 15. Namespaces By: Hitesh Santani • A namespace is a logical collection/grouping of classes. • It helps us out to categorize the library classes in according to their purpose. • Because of the namespaces, we do not have to remember names of each and every class. • We just need to remember the name of the namespace to which the class belongs. • A namespace is just a logical container for the library classes. • Namespaces can be used to differentiate two different classes with the same name using a Fully Qualified Name. A Fully Qualified Name is a combination of the class name and the namespace’s name to which the class belongs. • The topmost namespace in the .Net framework is System. The rest of the namespaces are a part of the System namespace.
  • 16. Common Language Runtime (CLR) By: Hitesh Santani • CLR is one of the main components of .Net. • It’s the execution engine and environment of the framework. • It stays in between the .Net framework and the underlying Operating System. • It loads and executes the code. • It provides all the services which the program may need at run-time. • Every language that wants it’s programs to run in CLR, must obey the rules being imposed by CLR.
  • 17. Compiled Code By: Hitesh Santani  In order to serve the request given by the user, ASP.Net must first compile the code. We can write the ASP.Net code in any of the languages supported by .Net framework.  When we compile the code, it is translated into MSIL which is language-independent.  Then this MSIL is converted into machine-specific instructions.
  • 18. Benefits of Compiled Code By: Hitesh Santani • Stability: When the code is compiled, it is checked for syntax error, type safety etc so that many errors can be eliminated from the later stage. • Performance: The execution of the compiled code is faster then the scripts such as VBScript. • Security: Compiled code is difficult to read. So no one can convert the compiled code back into the source code. • Interoperability: We are able to use assemblies written in different languages as MSIL supports any .Net languages.
  • 19. Inline Code (In-Page Code) By: Hitesh Santani  Traditional developers were using this approach.  Client-side and Server-side code is intermixed into a single page.  Becomes very difficult to maintain the events and event handlers in a large single page.  Its written in the <script> tag.
  • 20. Code Behind By: Hitesh Santani • Separate files are maintained for Client-side and Server- side code. • One file contains HTML which is the .aspx file. • The other file contains the server-side code which is called Code Behind file. It can be either .vb or .cs. • Separates the design layout and the coding part. • At the time of compilation, both files are combined and one class is generated which is used to serve the user requests.
  • 21. Object Oriented Concepts By: Hitesh Santani  Class  Fields  Properties  Methods  Events  Objects  Constructors  Destructors  Encapsulation  Inheritance  Abstraction  Abstract Class  Interface  Polymorphism  Method Overriding  Partial Classes
  • 22. Class By: Hitesh Santani  The class is a template through which we can create an object.  In .Net, it contains fields, properties, methods (procedures and functions) and events.  Syntax: [Access Modifier] [Shadows] [MustInherit|NotInheritable] Class <name> [Implements <interfacename>] Statements End Class
  • 23. Fields By: Hitesh Santani  They are the variables in the class.  They can be read or set directly.  They store the actual data which is being given to an object.  Example: Public Class MyClass Public x As Integer End Class
  • 24. Properties By: Hitesh Santani • Properties are retrieved and set like fields. • They are implemented using Property Get and Property Set procedures which provide more control on how values are set or returned. • Example: Public Class MyClass Private Name As String Public Property FullName() As String Get Return Name End Get Set(ByVal Value As String) Name = Value End Set End Property End Class
  • 25. Methods By: Hitesh Santani • Methods represent the object’s built-in procedures. • For example, a class named Employee may have methods named CalculateSalary and CalculateLeaves. • We can defined methods by adding procedures and functions to the class. • Example: Public Class Employee Public Sub CalculateSalary() Write(“-------”) End Sub Public Sub CalculateLeaves() Write(“-------”) End Sub End Class
  • 26. Objects By: Hitesh Santani  They are the basic runtime entities. They are the variables of the class.  It is said to be the instance of the class.  Example: Dim obj as MyClass
  • 27. Constructor By: Hitesh Santani  They are the special procedures that are invoked automatically when an object of a class is created.  Example: Public Sub New(ByVal newValue as Integer) value = newValue End Sub
  • 28. Destructor By: Hitesh Santani • We know how to create constructor, but what about destructor? • It is also executed automatically when an object is about to be destroyed. • We can place code to clean up the reserved resources in a destructor. • In VB.Net, we can use the Finalize method for this purpose. The Finalize method is called automatically when an object is marked as unusable and is to be destroyed. • Example: Public Class MyClass Protected Overrides Sub Finalize() Statements End Sub End Class
  • 29. Encapsulation By: Hitesh Santani • The process of combining data members and methods in a single unit is called Encapsulation. • When using Data Encapsulation, data is not accessed directly, it is only accessible through the functions available within the class. • Data Encapsulation enables the important concept of Data Hiding. • Protecting data from unauthorized access is called Data Hiding.
  • 30. Inheritance By: Hitesh Santani • It is the process by which object of one class acquires the properties (members) of another class. • It’s the process of forming a new class from an existing class. • The existing class is called a parent/super/base class. • The new class is called child/sub/derived class. • It is important because it supports hierarchical classification and code reusability. • We can add new features to a class without even touching it by deriving a new class. • To inherit the class, Inherits keyword is used with the derived class.
  • 31. By: Hitesh Santani  Example: Public Class Person ‘Members of Person class End Class Public Class Employee Inherits Person ‘Members of Employee class End Class
  • 32. Abstraction By: Hitesh Santani  It is a mechanism of representing essential features without including background details.  Data Abstraction increases the power of programming language by creating user defined data types.  When the classes use the concept of data abstraction, they are also known as Abstract Data Types (ADT).
  • 33. Abstract Class By: Hitesh Santani  MustInherit keyword is used to declare a class that cannot be instantiated and can be used only as a base class.  It is also called an Abstract Base Class (ABC).
  • 34. Interface By: Hitesh Santani • Example: Public Interface person Sub SetName(ByVal PersonName As String) Function GetName() As String End Interface Public Class employee Implements person Dim Name As String Sub SetName(ByVal PersonName As String) Implements person.SetName Name = PersonName End Sub Function GetName() As String Implements person.GetName Return Name End Function End Class
  • 35. Polymorphism By: Hitesh Santani  Poly means many and morphism means forms i.e. one name many forms.  The ability of functions and operators to act in different ways on different data types is called polymorphism.  To use one function name for many different purposes is known as function overloading.  Overloads keyword is used.
  • 36. By: Hitesh Santani • Example: Overloads Function Add(ByVal a1 As Integer, ByVal a2 As Integer) As Integer Return a1+a2 End Function Overloads Function Add(ByVal a1 As Integer, ByVal a2 As Integer, ByVal a3 As Integer) As Integer Return a1+a2+a3 End Function
  • 37. Method Overriding By: Hitesh Santani  The process in which a subclass provide a specific implementation of a method, that is already provided by one of its super classes is called Method Overriding.  The implementation in the subclass overrides (replaces) the implementation in the superclass.
  • 38. By: Hitesh Santani • Following keywords are for method overriding: – Overridable: Allows a property or method in a class to be overridden. – Overrides: Overrides an Overridable property or method. – NotOverridable: Prevents a property or method from being overridden. Public methods are NotOverridable by default. – MustOverride: Requires that a derived class override the property or method. MustOverride methods must be declared in MustInherit classes.
  • 40. Event Driven Programming By: Hitesh Santani • Event: An event is a user action which he/she has performed for a purpose. Examples are clicking or double clicking a button, typing a character, hovering mouse pointer etc. • Event Source: An event source is an element on the screen on which the user performs the action which triggers the event. • Event Handler: An event handler is a set of statements which has been written to handle a specific event. • Event Dispatcher: This is the module which handles all the triggered events and calls the appropriate event handler function.
  • 41. Any Questions in this unit? By: Hitesh Santani