尊敬的 微信汇率:1円 ≈ 0.046166 元 支付宝汇率:1円 ≈ 0.046257元 [退出登录]
SlideShare a Scribd company logo
Introduction to ASP.NET
Week 11, day1
ASP
Active Server Pages
‚ASP.NET is a server side scripting language‛
.NET overview
•.NET is a framework for developing web-based and
windows-based applications within the Microsoft
environment.
• Components of .NET
 MICROSOFT Intermediate language - all code is
complied into a more abstract, trimmed version before
execution. All .NET languages are compiled to MSIL –
the common language of .NET
The CLR- common language runtime; responsible for
executing MSIL code; interfaces to Windows and IIS
A rich set of libraries (Framework Class Libraries)
available to all .NET languages
Components of .NET (Continuation)
The .NET languages such as C#, VB.NET etc that
conform to CLR
ASP.NET is how the Framework is exposed to the
web, using IIS (internet information system) to manage
simple pages of code so that they can be complied into
full .NET programs. These generate HTML for the
browser (when the page is requested by a client
browser).
Generate HTML
Get index.aspx
1
3
4
pass index.aspx to .net
framework
5
WebServer
Index.aspx in
interpreted HTMl form
Browser
2
Get index.aspx from
hard disk
How IIS takes requests and processes it
.NET
Scripting Languages
• A ‚script‛ is a collection of program or sequence of instructions that is
interpreted or carried out by another program rather than by the computer
processor. Two types of scripting languages are
– Client-side Scripting Language
– Server-side Scripting Language
• In server-side scripting, (such as PHP, ASP) the script is processed by the
server Like: Apache, ColdFusion, ISAPI and Microsoft's IIS on Windows.
• Client-side scripting such as JavaScript runs on the web browser.
Generate HTML
Get index.aspx
1
3
4
pass index.aspx to .net
framework
5
WebServer
Index.aspx in
interpreted HTMl form
Browser
2
Get index.aspx from
hard disk
How IIS takes requests and processes it
.NET
ASP.NET is a server side
scripting language because the
code runs on the server and
returns the result in html form
to the client browser
Generate HTML
Get index.aspx
1
3
4
pass index.aspx to .net
framework
5
WebServer
Index.aspx in
interpreted HTMl form
Browser
2
Get index.aspx from
hard disk
How IIS takes requests and processes it
.NET
Client side scripting is something
where code runs on client
side(browser). For eg checking
whether a HTML text field contains
data or not can be done by running
a script from browser itself
Microsoft Visual Studio
•Microsoft Visual Studio is an IDE (Integrated Development
Environment) on which .net applications can be created
easily.
•It is a powerful tool that can expose the features of the
.net framework to make the developers work easier
•Applications can be run from within the IDE and has
inbuilt compiler and debugger (no need to install third
party servers like WAMP, XAMPP etc. to run the application
as in case of PHP)
•It exposes a rich design based interface to manage any
aspect of a .net project from design to deployment
Creating an asp.net page
Create a new asp.net website project
Go to start > all programs > microsoft visual studio 2008 (or whatever version
you have installed)
Create a new asp.net website project
Click on file > new web site
Create a new asp.net website project
(for C# select the language as Visual C#)
Create a new asp.net website project
Create a new asp.net website project
Create a new asp.net website project
Create a new asp.net website project
Create a new asp.net website project
• Double click on the button control you just created
Create a new asp.net website project
• You can also add handlers for other events of the button
Adding connection string to the web.config file
Adding a new item to the project
Adding a new item to the project
Running the project
Getting started with ASP.NET programming
.Net Controls, Events and Event handlers
• .net Controls –
 There are no. of controls those are available in the toolbox inside visual
studio. Eg. Button, textbox, dropdownlist etc.
 Each control represents a class extended from
the System.Web.UI.WebControls class
 Each control has events, properties and methods associated with it
 Each control in an aspx page is identified by a unique id, no two controls
on the same page can share an id
• Events
 Events happen when the user does some sort of action on a control eg.
Click for a button, changing the text for a textbox etc.
• Event Handlers
 Event handlers are code blocks that will be executed when events are
raised
.Net Controls, Events and Event handlers (continuation)
 In plain words an event handler for the click of a button that has an id
“btn_a” will tell the server like
“Do this on the click of btn_a”
 There are no. of event handlers associated with each type of .net control
 Custom event handlers can also be registered for certain controls.
Commenting
// comment single line
/* comment
multiple lines */
C#
//comment single line
/* Comment
multiple Lines*/
VB.NET
‘comment single line
/* Comment
multiple Lines*/
C ASP.NET
Data Types
Data types
• ASP.NET supports many different data types such as
o Integer
o String
o Double
o Boolean
o Datetime
o Arrays
Type Casting
 Response.write ((0.1 + 0.7) * 10); //Outputs 8
 Response.write ([cint] ((0.1 + 0.7) * 10));//Outputs 7
• This happens because the result of this simple arithmetic
expression is stored internally as 7.999999 instead of 8; when the
value is converted to integer, ASP.NET simply truncates away the
fractional part, resulting in a rather significant error (12.5%, to be
exact).
Variables
Declaring a variable
//Declaring a variable
Int a=10;
Char c=‘a’;
Float f=1.12;
C#
String a; //variable without initialisation
String a = ‚Hello‛; //variable with
initialisation
VB.NET
Dim a as string //variable without
initialisation
dim a as string = ‚Hello‛ //variable with
initialisation
C ASP.NET
Variables
• Variables are temporary storage containers.
• In ASP.NET, a variable can contain any type of data, such as, for example,
strings, integers, floating numbers, objects and arrays provided the variable
must be declared in that datatype.
• As in case of PHP which is loosely typed, ASP.NET will not implicitly
change the type of a variable as needed. ASP.NET languages are strongly
typed, like C and Java, where variables can only contain one type of data
throughout their existence.
Constants
Declaring a constant
//Declaring a constant using ‘const’
const int a=10;
int const a=10;
//Declaring a constant using ‘#define’
#define TRUE 1
#define FALSE 0
#define NAME_SIZE 20
C#
Const String a = ‚Hello‛;
VB.NET
const a as string = ‚Hello‛
C ASP.NET
Constants
• Conversely to variables, constants are meant for defining immutable
values.
• Compile-time and Run-time Constants
A compile-time constant is computed at the time the code is compiled,
while a run-time constant can only be computed while the application is
running. A compile-time constant will have the same value each time an
application runs, while a run-time constant may change each time.
Control structures
Control Structures
Conditional Control Structures
• If
• If else
• Switch
Loops
For
While
Do while
Other
• Break
• Continue
‚Exactly the same as on left side‛
+
• return
• go to
C ASP.NET
functions
Functions
Int findSum(int a,int b)
{
Int c;
c=a+b;
Return c
}
findSum(10,15);
function findSum(byVal a as
integer,byVal b as integer)
Dim c as integer
c=a+b
Return c
End function
Dim d as integer = findSum(10,15)
Response.write(d) ‘output : 25
C ASP.NET (vb.net example)
Functions
public int findSum(int a, int b) {
int c;
c = (a + b);
return c;
}
private int d = findSum(10, 15);
Response.write(d); //output : 25
ASP.NET (C# example)
Function arguments
• You can define any number of arguments to an ASP.NET function.
• Arguments can be passed by reference(byRef) or by value (byValue)
o byRef - When an argument is passed by reference, the called
procedure can change the value of the variable. The change persists
after the procedure is called
o byValue - When an argument is passed by value, any changes that the
called procedure makes to the value of the variable do not persist
after the procedure is called.
Function return type
• The function return type can also be defined in the function
declaration
– VB.net
Function findSum(byval a as integer, byval b as integer) as integer
Dim c as integer
c=a+b
Return c
End function
– C#
public int findSum(int a, int b) {
int c;
c = (a + b);
return c;
}
Function return type
• A function without a return value is called as a sub routine
and is defined as follows in ASP.NET
– Vb.net
private sub findSum(byval a as integer, byval b as integer)
Dim c as integer
c=a+b
End sub
– C#
Protected void findSum(int a, int b)
{
int c;
c=a+b;
}
Strings
Char a*+=‚Baabtra‛;
Printf(‚Hello %s‛,a);
Dim a as string =‚Baabtra‛
Response.write( ‚Hello ‛ + a) //Output:
Hello baabtra
Response.write( ‚Hello + a‛) //Output:
Hello + a
‚Strings will be continued in coming
chapters‛
C ASP.NET
Arrays
Indexed Array
int a[]={1,2,3,4,5,6,7,8,9,10};
for(i=0;i<10;i++)
Printf(‚%d‛,a[i]);
‚Array will be continued in coming
chapters‛
Declaring an array of strings
Vb.net
Dim arrStr as string() //without
initialisation
Dim arrStr as string() = (‚a‛, ‚b‛)
//with initialisation
C#
string[] arrStr ;//without
initialisation
string[] arrStr = new string[] {
"one", "two", "three" } //with
initialisation
C ASP.NET
Operators
Operators
C
Arithmetic Operators
+, ++, -, --, *, /, %
Comparison Operators
==, !=, ===, !==, >, >=, < , <=
Logical Operators
&&, ||, !
Assignment Operators
=, +=, -=, *=, /=, %=
ASP.NET
Arithmetic Operators
Ope
rato
r
description Example Re
sul
t
+ Addition myNum = 3 + 4 7
- Subtraction myNum = 4 - 3 1
* Multiplication myNum = 3 * 4 12
/ Division myNum = 12 /4 3
^ Exponential myNum = 2 ^ 4 16
Mod Modulus myNum = 23
Mod 10
3
- Negation myNum = -10 -10
 Integer
Division
myNum = 9  3 3
Comparison operators
Operator description Example Result
= Equal to 3 = 4 false
< Less than 4 < 3 false
> Greater than 4 > 3 true
<= Less than or equal to 4 <= 4 true
>= Greater than or equal to 4 >= 5 false
<> / != Not equal to 4 <> 3 / 4 != 3 true
Logical operators
Operator description Example Result
And / && Both Must be TRUE True And False false
Or / || One Must be TRUE True Or False true
Not / ! Flips Truth Value Not true false
String operators
Operator description Example Result
& / +
String Concatenation string4 = “Hello" & " world"
string4 = “Hello
world"
• Bitwise operators allow you to manipulate bits of data. All these operators are
designed to work only on integer numbers—therefore, the interpreter will attempt
to convert their operands to integers before executing them.
Bitwise Operators
AND Bitwise AND. The result of the operation will be a value whose bits are set if they are set
in both operands, and unset otherwise.
OR Bitwise OR. The result of the operation will be a value whose bits are set if they are set in
either operand (or both), and unset otherwise.
XOR Bitwise XOR (exclusive OR). The result of the operation will be a value whose bits are set
if they are set in either operand, and unset otherwise.
NOT Bitwise NOT. inverts each bit in a sequence of bits. A 0 becomes a 1, and a 1 becomes
a 0.
<< Bitwise left shift. This operation shifts the left-hand operand’s bits to the left by a number
of positions equal to the right operand, inserting unset bits in the shifted positions
>> Bitwise right shift. This operation shifts the left-hand operand’s bits to the right by a
number of positions equal to the right operand, inserting unset bits in the shifted
positions.
End of day 1
If this presentation helped you, please visit our
page facebook.com/baabtra and like it.
Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com
Contact Us
Emarald Mall (Big Bazar Building)
Mavoor Road, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
NC Complex, Near Bus Stand
Mukkam, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
Start up Village
Eranakulam,
Kerala, India.
Email: info@baabtra.com

More Related Content

What's hot

Developing an ASP.NET Web Application
Developing an ASP.NET Web ApplicationDeveloping an ASP.NET Web Application
Developing an ASP.NET Web Application
Rishi Kothari
 
Servlets
ServletsServlets
Servlets
ZainabNoorGul
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
Doris Chen
 
ASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with OverviewASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with Overview
Shahed Chowdhuri
 
Namespaces in C#
Namespaces in C#Namespaces in C#
Namespaces in C#
yogita kachve
 
ADO .Net
ADO .Net ADO .Net
ADO .Net
DrSonali Vyas
 
Introduction To C#
Introduction To C#Introduction To C#
Introduction To C#
SAMIR BHOGAYTA
 
Introduction To Dotnet
Introduction To DotnetIntroduction To Dotnet
Introduction To Dotnet
SAMIR BHOGAYTA
 
Asp.net state management
Asp.net state managementAsp.net state management
Asp.net state management
priya Nithya
 
java Servlet technology
java Servlet technologyjava Servlet technology
java Servlet technology
Tanmoy Barman
 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET Framework
Raghuveer Guthikonda
 
Architecture of .net framework
Architecture of .net frameworkArchitecture of .net framework
Architecture of .net framework
Then Murugeshwari
 
Web forms in ASP.net
Web forms in ASP.netWeb forms in ASP.net
Web forms in ASP.net
Madhuri Kavade
 
C#.NET
C#.NETC#.NET
C#.NET
gurchet
 
Mvc architecture
Mvc architectureMvc architecture
Mvc architecture
Surbhi Panhalkar
 
GRID VIEW PPT
GRID VIEW PPTGRID VIEW PPT
Design patterns ppt
Design patterns pptDesign patterns ppt
Design patterns ppt
Aman Jain
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
ivpol
 
Asp net
Asp netAsp net
Java Servlets
Java ServletsJava Servlets
Java Servlets
BG Java EE Course
 

What's hot (20)

Developing an ASP.NET Web Application
Developing an ASP.NET Web ApplicationDeveloping an ASP.NET Web Application
Developing an ASP.NET Web Application
 
Servlets
ServletsServlets
Servlets
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
ASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with OverviewASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with Overview
 
Namespaces in C#
Namespaces in C#Namespaces in C#
Namespaces in C#
 
ADO .Net
ADO .Net ADO .Net
ADO .Net
 
Introduction To C#
Introduction To C#Introduction To C#
Introduction To C#
 
Introduction To Dotnet
Introduction To DotnetIntroduction To Dotnet
Introduction To Dotnet
 
Asp.net state management
Asp.net state managementAsp.net state management
Asp.net state management
 
java Servlet technology
java Servlet technologyjava Servlet technology
java Servlet technology
 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET Framework
 
Architecture of .net framework
Architecture of .net frameworkArchitecture of .net framework
Architecture of .net framework
 
Web forms in ASP.net
Web forms in ASP.netWeb forms in ASP.net
Web forms in ASP.net
 
C#.NET
C#.NETC#.NET
C#.NET
 
Mvc architecture
Mvc architectureMvc architecture
Mvc architecture
 
GRID VIEW PPT
GRID VIEW PPTGRID VIEW PPT
GRID VIEW PPT
 
Design patterns ppt
Design patterns pptDesign patterns ppt
Design patterns ppt
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
 
Asp net
Asp netAsp net
Asp net
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 

Viewers also liked

Sdk overview
Sdk overviewSdk overview
Sdk overview
guestfa73ae
 
Dev Basics: The ASP.NET Page Life Cycle
Dev Basics: The ASP.NET Page Life CycleDev Basics: The ASP.NET Page Life Cycle
Dev Basics: The ASP.NET Page Life Cycle
Jay Harris
 
DotNet Introduction
DotNet IntroductionDotNet Introduction
DotNet Introduction
Wei Sun
 
ASP.NET Lecture 1
ASP.NET Lecture 1ASP.NET Lecture 1
ASP.NET Lecture 1
Julie Iskander
 
Dotnet Basics Presentation
Dotnet Basics PresentationDotnet Basics Presentation
Dotnet Basics Presentation
Sudhakar Sharma
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework Overview
Doncho Minkov
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net framework
Arun Prasad
 
ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1
Kumar S
 

Viewers also liked (8)

Sdk overview
Sdk overviewSdk overview
Sdk overview
 
Dev Basics: The ASP.NET Page Life Cycle
Dev Basics: The ASP.NET Page Life CycleDev Basics: The ASP.NET Page Life Cycle
Dev Basics: The ASP.NET Page Life Cycle
 
DotNet Introduction
DotNet IntroductionDotNet Introduction
DotNet Introduction
 
ASP.NET Lecture 1
ASP.NET Lecture 1ASP.NET Lecture 1
ASP.NET Lecture 1
 
Dotnet Basics Presentation
Dotnet Basics PresentationDotnet Basics Presentation
Dotnet Basics Presentation
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework Overview
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net framework
 
ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1
 

Similar to ASP.NET Basics

ASP DOT NET
ASP DOT NETASP DOT NET
ASP DOT NET
Pratik Tambekar
 
How to develop asp web applications
How to develop asp web applicationsHow to develop asp web applications
How to develop asp web applications
Deepankar Pathak
 
introaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.ppt
introaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.pptintroaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.ppt
introaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.ppt
AvijitChaudhuri3
 
introaspnet.ppt
introaspnet.pptintroaspnet.ppt
introaspnet.ppt
asmachehbi
 
introaspnet.ppt
introaspnet.pptintroaspnet.ppt
introaspnet.ppt
IbrahimBurhan6
 
Visual Studio.NET
Visual Studio.NETVisual Studio.NET
Visual Studio.NET
salonityagi
 
introasp_net-7364068.ppt
introasp_net-7364068.pptintroasp_net-7364068.ppt
introasp_net-7364068.ppt
IQM123
 
introasp_net-6563550.ppt
introasp_net-6563550.pptintroasp_net-6563550.ppt
introasp_net-6563550.ppt
IQM123
 
Introduction to asp
Introduction to aspIntroduction to asp
Introduction to asp
Madhuri Kavade
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
shuklagirish
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
shuklagirish
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
shuklagirish
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
shuklagirish
 
Visual studio.net
Visual studio.netVisual studio.net
Visual studio.net
Satish Verma
 
introaspnet-5856912.ppt
introaspnet-5856912.pptintroaspnet-5856912.ppt
introaspnet-5856912.ppt
IQM123
 
introaspnet-3030384.ppt
introaspnet-3030384.pptintroaspnet-3030384.ppt
introaspnet-3030384.ppt
IQM123
 
Intro dotnet
Intro dotnetIntro dotnet
Unit - 1: ASP.NET Basic
Unit - 1:  ASP.NET BasicUnit - 1:  ASP.NET Basic
Unit - 1: ASP.NET Basic
KALIDHASANR
 
Aspintro
AspintroAspintro
Introaspnet
IntroaspnetIntroaspnet

Similar to ASP.NET Basics (20)

ASP DOT NET
ASP DOT NETASP DOT NET
ASP DOT NET
 
How to develop asp web applications
How to develop asp web applicationsHow to develop asp web applications
How to develop asp web applications
 
introaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.ppt
introaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.pptintroaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.ppt
introaspnetkjadbfksdjkfaskjdbfkajsbfkjfjkswa.ppt
 
introaspnet.ppt
introaspnet.pptintroaspnet.ppt
introaspnet.ppt
 
introaspnet.ppt
introaspnet.pptintroaspnet.ppt
introaspnet.ppt
 
Visual Studio.NET
Visual Studio.NETVisual Studio.NET
Visual Studio.NET
 
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
 
Introduction to asp
Introduction to aspIntroduction to asp
Introduction to asp
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Visual studio.net
Visual studio.netVisual studio.net
Visual studio.net
 
introaspnet-5856912.ppt
introaspnet-5856912.pptintroaspnet-5856912.ppt
introaspnet-5856912.ppt
 
introaspnet-3030384.ppt
introaspnet-3030384.pptintroaspnet-3030384.ppt
introaspnet-3030384.ppt
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Unit - 1: ASP.NET Basic
Unit - 1:  ASP.NET BasicUnit - 1:  ASP.NET Basic
Unit - 1: ASP.NET Basic
 
Aspintro
AspintroAspintro
Aspintro
 
Introaspnet
IntroaspnetIntroaspnet
Introaspnet
 

More from baabtra.com - No. 1 supplier of quality freshers

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
baabtra.com - No. 1 supplier of quality freshers
 
Best coding practices
Best coding practicesBest coding practices
Core java - baabtra
Core java - baabtraCore java - baabtra
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
baabtra.com - No. 1 supplier of quality freshers
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
baabtra.com - No. 1 supplier of quality freshers
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
baabtra.com - No. 1 supplier of quality freshers
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php database connectivity
Php database connectivityPhp database connectivity
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Blue brain
Blue brainBlue brain
5g
5g5g
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Gd baabtra
Gd baabtraGd baabtra

More from baabtra.com - No. 1 supplier of quality freshers (20)

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
 
Blue brain
Blue brainBlue brain
Blue brain
 
5g
5g5g
5g
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
 

Recently uploaded

Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdfLee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
leebarnesutopia
 
An Introduction to All Data Enterprise Integration
An Introduction to All Data Enterprise IntegrationAn Introduction to All Data Enterprise Integration
An Introduction to All Data Enterprise Integration
Safe Software
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
zjhamm304
 
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
manji sharman06
 
APJC Introduction to ThousandEyes Webinar
APJC Introduction to ThousandEyes WebinarAPJC Introduction to ThousandEyes Webinar
APJC Introduction to ThousandEyes Webinar
ThousandEyes
 
Multivendor cloud production with VSF TR-11 - there and back again
Multivendor cloud production with VSF TR-11 - there and back againMultivendor cloud production with VSF TR-11 - there and back again
Multivendor cloud production with VSF TR-11 - there and back again
Kieran Kunhya
 
Communications Mining Series - Zero to Hero - Session 2
Communications Mining Series - Zero to Hero - Session 2Communications Mining Series - Zero to Hero - Session 2
Communications Mining Series - Zero to Hero - Session 2
DianaGray10
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving
 
Automation Student Developers Session 3: Introduction to UI Automation
Automation Student Developers Session 3: Introduction to UI AutomationAutomation Student Developers Session 3: Introduction to UI Automation
Automation Student Developers Session 3: Introduction to UI Automation
UiPathCommunity
 
Fuxnet [EN] .pdf
Fuxnet [EN]                                   .pdfFuxnet [EN]                                   .pdf
Fuxnet [EN] .pdf
Overkill Security
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google CloudRadically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
ScyllaDB
 
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc
 
Call Girls Kochi 💯Call Us 🔝 7426014248 🔝 Independent Kochi Escorts Service Av...
Call Girls Kochi 💯Call Us 🔝 7426014248 🔝 Independent Kochi Escorts Service Av...Call Girls Kochi 💯Call Us 🔝 7426014248 🔝 Independent Kochi Escorts Service Av...
Call Girls Kochi 💯Call Us 🔝 7426014248 🔝 Independent Kochi Escorts Service Av...
dipikamodels1
 
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My IdentityCNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
Cynthia Thomas
 
Real-Time Persisted Events at Supercell
Real-Time Persisted Events at  SupercellReal-Time Persisted Events at  Supercell
Real-Time Persisted Events at Supercell
ScyllaDB
 
MongoDB to ScyllaDB: Technical Comparison and the Path to Success
MongoDB to ScyllaDB: Technical Comparison and the Path to SuccessMongoDB to ScyllaDB: Technical Comparison and the Path to Success
MongoDB to ScyllaDB: Technical Comparison and the Path to Success
ScyllaDB
 
Elasticity vs. State? Exploring Kafka Streams Cassandra State Store
Elasticity vs. State? Exploring Kafka Streams Cassandra State StoreElasticity vs. State? Exploring Kafka Streams Cassandra State Store
Elasticity vs. State? Exploring Kafka Streams Cassandra State Store
ScyllaDB
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
DanBrown980551
 
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
AlexanderRichford
 

Recently uploaded (20)

Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdfLee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
 
An Introduction to All Data Enterprise Integration
An Introduction to All Data Enterprise IntegrationAn Introduction to All Data Enterprise Integration
An Introduction to All Data Enterprise Integration
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
 
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
 
APJC Introduction to ThousandEyes Webinar
APJC Introduction to ThousandEyes WebinarAPJC Introduction to ThousandEyes Webinar
APJC Introduction to ThousandEyes Webinar
 
Multivendor cloud production with VSF TR-11 - there and back again
Multivendor cloud production with VSF TR-11 - there and back againMultivendor cloud production with VSF TR-11 - there and back again
Multivendor cloud production with VSF TR-11 - there and back again
 
Communications Mining Series - Zero to Hero - Session 2
Communications Mining Series - Zero to Hero - Session 2Communications Mining Series - Zero to Hero - Session 2
Communications Mining Series - Zero to Hero - Session 2
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
 
Automation Student Developers Session 3: Introduction to UI Automation
Automation Student Developers Session 3: Introduction to UI AutomationAutomation Student Developers Session 3: Introduction to UI Automation
Automation Student Developers Session 3: Introduction to UI Automation
 
Fuxnet [EN] .pdf
Fuxnet [EN]                                   .pdfFuxnet [EN]                                   .pdf
Fuxnet [EN] .pdf
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google CloudRadically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
 
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
 
Call Girls Kochi 💯Call Us 🔝 7426014248 🔝 Independent Kochi Escorts Service Av...
Call Girls Kochi 💯Call Us 🔝 7426014248 🔝 Independent Kochi Escorts Service Av...Call Girls Kochi 💯Call Us 🔝 7426014248 🔝 Independent Kochi Escorts Service Av...
Call Girls Kochi 💯Call Us 🔝 7426014248 🔝 Independent Kochi Escorts Service Av...
 
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My IdentityCNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
 
Real-Time Persisted Events at Supercell
Real-Time Persisted Events at  SupercellReal-Time Persisted Events at  Supercell
Real-Time Persisted Events at Supercell
 
MongoDB to ScyllaDB: Technical Comparison and the Path to Success
MongoDB to ScyllaDB: Technical Comparison and the Path to SuccessMongoDB to ScyllaDB: Technical Comparison and the Path to Success
MongoDB to ScyllaDB: Technical Comparison and the Path to Success
 
Elasticity vs. State? Exploring Kafka Streams Cassandra State Store
Elasticity vs. State? Exploring Kafka Streams Cassandra State StoreElasticity vs. State? Exploring Kafka Streams Cassandra State Store
Elasticity vs. State? Exploring Kafka Streams Cassandra State Store
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
 
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
 

ASP.NET Basics

  • 2. ASP Active Server Pages ‚ASP.NET is a server side scripting language‛
  • 3. .NET overview •.NET is a framework for developing web-based and windows-based applications within the Microsoft environment. • Components of .NET  MICROSOFT Intermediate language - all code is complied into a more abstract, trimmed version before execution. All .NET languages are compiled to MSIL – the common language of .NET The CLR- common language runtime; responsible for executing MSIL code; interfaces to Windows and IIS A rich set of libraries (Framework Class Libraries) available to all .NET languages
  • 4. Components of .NET (Continuation) The .NET languages such as C#, VB.NET etc that conform to CLR ASP.NET is how the Framework is exposed to the web, using IIS (internet information system) to manage simple pages of code so that they can be complied into full .NET programs. These generate HTML for the browser (when the page is requested by a client browser).
  • 5. Generate HTML Get index.aspx 1 3 4 pass index.aspx to .net framework 5 WebServer Index.aspx in interpreted HTMl form Browser 2 Get index.aspx from hard disk How IIS takes requests and processes it .NET
  • 6. Scripting Languages • A ‚script‛ is a collection of program or sequence of instructions that is interpreted or carried out by another program rather than by the computer processor. Two types of scripting languages are – Client-side Scripting Language – Server-side Scripting Language • In server-side scripting, (such as PHP, ASP) the script is processed by the server Like: Apache, ColdFusion, ISAPI and Microsoft's IIS on Windows. • Client-side scripting such as JavaScript runs on the web browser.
  • 7. Generate HTML Get index.aspx 1 3 4 pass index.aspx to .net framework 5 WebServer Index.aspx in interpreted HTMl form Browser 2 Get index.aspx from hard disk How IIS takes requests and processes it .NET ASP.NET is a server side scripting language because the code runs on the server and returns the result in html form to the client browser
  • 8. Generate HTML Get index.aspx 1 3 4 pass index.aspx to .net framework 5 WebServer Index.aspx in interpreted HTMl form Browser 2 Get index.aspx from hard disk How IIS takes requests and processes it .NET Client side scripting is something where code runs on client side(browser). For eg checking whether a HTML text field contains data or not can be done by running a script from browser itself
  • 9. Microsoft Visual Studio •Microsoft Visual Studio is an IDE (Integrated Development Environment) on which .net applications can be created easily. •It is a powerful tool that can expose the features of the .net framework to make the developers work easier •Applications can be run from within the IDE and has inbuilt compiler and debugger (no need to install third party servers like WAMP, XAMPP etc. to run the application as in case of PHP) •It exposes a rich design based interface to manage any aspect of a .net project from design to deployment
  • 11. Create a new asp.net website project Go to start > all programs > microsoft visual studio 2008 (or whatever version you have installed)
  • 12. Create a new asp.net website project Click on file > new web site
  • 13. Create a new asp.net website project (for C# select the language as Visual C#)
  • 14. Create a new asp.net website project
  • 15. Create a new asp.net website project
  • 16. Create a new asp.net website project
  • 17. Create a new asp.net website project
  • 18. Create a new asp.net website project • Double click on the button control you just created
  • 19. Create a new asp.net website project • You can also add handlers for other events of the button
  • 20. Adding connection string to the web.config file
  • 21. Adding a new item to the project
  • 22. Adding a new item to the project
  • 24. Getting started with ASP.NET programming
  • 25. .Net Controls, Events and Event handlers • .net Controls –  There are no. of controls those are available in the toolbox inside visual studio. Eg. Button, textbox, dropdownlist etc.  Each control represents a class extended from the System.Web.UI.WebControls class  Each control has events, properties and methods associated with it  Each control in an aspx page is identified by a unique id, no two controls on the same page can share an id • Events  Events happen when the user does some sort of action on a control eg. Click for a button, changing the text for a textbox etc. • Event Handlers  Event handlers are code blocks that will be executed when events are raised
  • 26. .Net Controls, Events and Event handlers (continuation)  In plain words an event handler for the click of a button that has an id “btn_a” will tell the server like “Do this on the click of btn_a”  There are no. of event handlers associated with each type of .net control  Custom event handlers can also be registered for certain controls.
  • 27. Commenting // comment single line /* comment multiple lines */ C# //comment single line /* Comment multiple Lines*/ VB.NET ‘comment single line /* Comment multiple Lines*/ C ASP.NET
  • 29. Data types • ASP.NET supports many different data types such as o Integer o String o Double o Boolean o Datetime o Arrays
  • 30. Type Casting  Response.write ((0.1 + 0.7) * 10); //Outputs 8  Response.write ([cint] ((0.1 + 0.7) * 10));//Outputs 7 • This happens because the result of this simple arithmetic expression is stored internally as 7.999999 instead of 8; when the value is converted to integer, ASP.NET simply truncates away the fractional part, resulting in a rather significant error (12.5%, to be exact).
  • 32. Declaring a variable //Declaring a variable Int a=10; Char c=‘a’; Float f=1.12; C# String a; //variable without initialisation String a = ‚Hello‛; //variable with initialisation VB.NET Dim a as string //variable without initialisation dim a as string = ‚Hello‛ //variable with initialisation C ASP.NET
  • 33. Variables • Variables are temporary storage containers. • In ASP.NET, a variable can contain any type of data, such as, for example, strings, integers, floating numbers, objects and arrays provided the variable must be declared in that datatype. • As in case of PHP which is loosely typed, ASP.NET will not implicitly change the type of a variable as needed. ASP.NET languages are strongly typed, like C and Java, where variables can only contain one type of data throughout their existence.
  • 35. Declaring a constant //Declaring a constant using ‘const’ const int a=10; int const a=10; //Declaring a constant using ‘#define’ #define TRUE 1 #define FALSE 0 #define NAME_SIZE 20 C# Const String a = ‚Hello‛; VB.NET const a as string = ‚Hello‛ C ASP.NET
  • 36. Constants • Conversely to variables, constants are meant for defining immutable values. • Compile-time and Run-time Constants A compile-time constant is computed at the time the code is compiled, while a run-time constant can only be computed while the application is running. A compile-time constant will have the same value each time an application runs, while a run-time constant may change each time.
  • 38. Control Structures Conditional Control Structures • If • If else • Switch Loops For While Do while Other • Break • Continue ‚Exactly the same as on left side‛ + • return • go to C ASP.NET
  • 40. Functions Int findSum(int a,int b) { Int c; c=a+b; Return c } findSum(10,15); function findSum(byVal a as integer,byVal b as integer) Dim c as integer c=a+b Return c End function Dim d as integer = findSum(10,15) Response.write(d) ‘output : 25 C ASP.NET (vb.net example)
  • 41. Functions public int findSum(int a, int b) { int c; c = (a + b); return c; } private int d = findSum(10, 15); Response.write(d); //output : 25 ASP.NET (C# example)
  • 42. Function arguments • You can define any number of arguments to an ASP.NET function. • Arguments can be passed by reference(byRef) or by value (byValue) o byRef - When an argument is passed by reference, the called procedure can change the value of the variable. The change persists after the procedure is called o byValue - When an argument is passed by value, any changes that the called procedure makes to the value of the variable do not persist after the procedure is called.
  • 43. Function return type • The function return type can also be defined in the function declaration – VB.net Function findSum(byval a as integer, byval b as integer) as integer Dim c as integer c=a+b Return c End function – C# public int findSum(int a, int b) { int c; c = (a + b); return c; }
  • 44. Function return type • A function without a return value is called as a sub routine and is defined as follows in ASP.NET – Vb.net private sub findSum(byval a as integer, byval b as integer) Dim c as integer c=a+b End sub – C# Protected void findSum(int a, int b) { int c; c=a+b; }
  • 45. Strings Char a*+=‚Baabtra‛; Printf(‚Hello %s‛,a); Dim a as string =‚Baabtra‛ Response.write( ‚Hello ‛ + a) //Output: Hello baabtra Response.write( ‚Hello + a‛) //Output: Hello + a ‚Strings will be continued in coming chapters‛ C ASP.NET
  • 46. Arrays Indexed Array int a[]={1,2,3,4,5,6,7,8,9,10}; for(i=0;i<10;i++) Printf(‚%d‛,a[i]); ‚Array will be continued in coming chapters‛ Declaring an array of strings Vb.net Dim arrStr as string() //without initialisation Dim arrStr as string() = (‚a‛, ‚b‛) //with initialisation C# string[] arrStr ;//without initialisation string[] arrStr = new string[] { "one", "two", "three" } //with initialisation C ASP.NET
  • 48. Operators C Arithmetic Operators +, ++, -, --, *, /, % Comparison Operators ==, !=, ===, !==, >, >=, < , <= Logical Operators &&, ||, ! Assignment Operators =, +=, -=, *=, /=, %= ASP.NET Arithmetic Operators Ope rato r description Example Re sul t + Addition myNum = 3 + 4 7 - Subtraction myNum = 4 - 3 1 * Multiplication myNum = 3 * 4 12 / Division myNum = 12 /4 3 ^ Exponential myNum = 2 ^ 4 16 Mod Modulus myNum = 23 Mod 10 3 - Negation myNum = -10 -10 Integer Division myNum = 9 3 3
  • 49. Comparison operators Operator description Example Result = Equal to 3 = 4 false < Less than 4 < 3 false > Greater than 4 > 3 true <= Less than or equal to 4 <= 4 true >= Greater than or equal to 4 >= 5 false <> / != Not equal to 4 <> 3 / 4 != 3 true
  • 50. Logical operators Operator description Example Result And / && Both Must be TRUE True And False false Or / || One Must be TRUE True Or False true Not / ! Flips Truth Value Not true false String operators Operator description Example Result & / + String Concatenation string4 = “Hello" & " world" string4 = “Hello world"
  • 51. • Bitwise operators allow you to manipulate bits of data. All these operators are designed to work only on integer numbers—therefore, the interpreter will attempt to convert their operands to integers before executing them. Bitwise Operators AND Bitwise AND. The result of the operation will be a value whose bits are set if they are set in both operands, and unset otherwise. OR Bitwise OR. The result of the operation will be a value whose bits are set if they are set in either operand (or both), and unset otherwise. XOR Bitwise XOR (exclusive OR). The result of the operation will be a value whose bits are set if they are set in either operand, and unset otherwise. NOT Bitwise NOT. inverts each bit in a sequence of bits. A 0 becomes a 1, and a 1 becomes a 0. << Bitwise left shift. This operation shifts the left-hand operand’s bits to the left by a number of positions equal to the right operand, inserting unset bits in the shifted positions >> Bitwise right shift. This operation shifts the left-hand operand’s bits to the right by a number of positions equal to the right operand, inserting unset bits in the shifted positions.
  • 53. If this presentation helped you, please visit our page facebook.com/baabtra and like it. Thanks in advance. www.baabtra.com | www.massbaab.com |www.baabte.com
  • 54. Contact Us Emarald Mall (Big Bazar Building) Mavoor Road, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 NC Complex, Near Bus Stand Mukkam, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 Start up Village Eranakulam, Kerala, India. Email: info@baabtra.com
  翻译: