<s>
ASP.NET	B-Application
Web	I-Application
Forms	I-Application
is	O
a	O
web	B-Application
application	I-Application
framework	I-Application
and	O
one	O
of	O
several	O
programming	O
models	O
supported	O
by	O
the	O
Microsoft	B-Application
ASP.NET	I-Application
technology	O
.	O
</s>
<s>
Web	B-Application
Forms	I-Application
applications	I-Application
can	O
be	O
written	O
in	O
any	O
programming	O
language	O
which	O
supports	O
the	O
Common	O
Language	O
Runtime	O
,	O
such	O
as	O
C#	B-Application
or	O
Visual	B-Language
Basic	I-Language
.	O
</s>
<s>
The	O
main	O
building	O
blocks	O
of	O
Web	B-Application
Forms	I-Application
pages	O
are	O
server	B-Application
controls	O
,	O
which	O
are	O
reusable	O
components	O
responsible	O
for	O
rendering	O
HTML	B-Language
markup	O
and	O
responding	O
to	O
events	O
.	O
</s>
<s>
A	O
technique	O
called	O
view	O
state	B-Application
is	O
used	O
to	O
persist	O
the	O
state	B-Application
of	O
server	B-Application
controls	O
between	O
normally	O
stateless	B-Protocol
HTTP	B-Protocol
requests	I-Protocol
.	O
</s>
<s>
Web	B-Application
Forms	I-Application
was	O
included	O
in	O
the	O
original	O
.NET	B-Application
Framework	I-Application
1.0	O
release	O
in	O
2002	O
(	O
see	O
.NET	B-Application
Framework	I-Application
version	I-Application
history	I-Application
and	O
ASP.NET	B-Application
version	O
history	O
)	O
,	O
as	O
the	O
first	O
programming	O
model	O
available	O
in	O
ASP.NET	B-Application
.	O
</s>
<s>
Unlike	O
newer	O
ASP.NET	B-Application
components	O
,	O
Web	B-Application
Forms	I-Application
is	O
not	O
supported	O
by	O
ASP.NET	B-Application
Core	I-Application
.	O
</s>
<s>
ASP.NET	B-Application
web	I-Application
pages	I-Application
,	O
known	O
officially	O
as	O
Web	B-Application
Forms	I-Application
,	O
were	O
the	O
main	O
building	O
blocks	O
for	O
application	O
development	O
in	O
ASP.NET	B-Application
before	O
the	O
introduction	O
of	O
MVC	O
.	O
</s>
<s>
There	O
are	O
two	O
basic	O
methodologies	O
for	O
Web	B-Application
Forms	I-Application
:	O
a	O
web	O
application	O
format	O
and	O
a	O
web	O
site	O
format	O
.	O
</s>
<s>
Web	O
applications	O
need	O
to	O
be	O
compiled	O
before	O
deployment	O
,	O
while	O
web	O
sites	O
allow	O
the	O
user	O
to	O
copy	O
the	O
files	O
directly	O
to	O
the	O
server	B-Application
without	O
prior	O
compilation	O
.	O
</s>
<s>
Web	B-Application
forms	I-Application
are	O
contained	O
in	O
files	O
with	O
a	O
"	O
.aspx	B-Application
"	O
extension	O
;	O
these	O
files	O
typically	O
contain	O
static	O
(	O
X	B-Language
)	O
HTML	B-Language
markup	O
or	O
component	O
markup	O
.	O
</s>
<s>
The	O
component	O
markup	O
can	O
include	O
server-side	O
Web	O
Controls	O
and	O
User	B-Application
Controls	I-Application
that	O
have	O
been	O
defined	O
in	O
the	O
framework	O
or	O
the	O
web	O
page	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
textbox	O
component	O
can	O
be	O
defined	O
on	O
a	O
page	O
as	O
<asp:textbox id='myid' runat='server'>	O
,	O
which	O
is	O
rendered	O
into	O
an	O
html	B-Language
input	O
box	O
.	O
</s>
<s>
Additionally	O
,	O
dynamic	O
code	O
,	O
which	O
runs	O
on	O
the	O
server	B-Application
,	O
can	O
be	O
placed	O
in	O
a	O
page	O
within	O
a	O
block	O
<% -- dynamic code -- %>	O
,	O
which	O
is	O
similar	O
to	O
other	O
Web	O
development	O
technologies	O
such	O
as	O
PHP	B-Application
,	O
JSP	B-Language
,	O
and	O
ASP	B-General_Concept
.	O
</s>
<s>
With	O
ASP.NET	B-Application
Framework	I-Application
2.0	O
,	O
Microsoft	O
introduced	O
a	O
new	O
code-behind	O
model	O
that	O
lets	O
static	O
text	O
remain	O
on	O
the	O
.aspx	B-Application
page	O
while	O
dynamic	O
code	O
goes	O
into	O
an	O
.aspx.vb	O
or	O
.aspx.cs	O
or	O
.aspx.fs	O
file	B-Operating_System
(	O
depending	O
on	O
the	O
programming	O
language	O
used	O
)	O
.	O
</s>
<s>
Microsoft	O
recommends	O
dealing	O
with	O
dynamic	O
program	O
code	O
by	O
using	O
the	O
code-behind	O
model	O
,	O
which	O
places	O
this	O
code	O
in	O
a	O
separate	O
file	B-Operating_System
or	O
in	O
a	O
specially	O
designated	O
script	O
tag	O
.	O
</s>
<s>
Code-behind	O
files	O
typically	O
have	O
names	O
like	O
"	O
MyPage.aspx.cs	O
 "	O
or	O
"	O
MyPage.aspx.vb	O
"	O
while	O
the	O
page	O
file	B-Operating_System
is	O
MyPage.aspx	O
(	O
same	O
filename	O
as	O
the	O
page	O
file	B-Operating_System
(	O
ASPX	B-Application
)	O
,	O
but	O
with	O
the	O
final	O
extension	O
denoting	O
the	O
page	O
language	O
)	O
.	O
</s>
<s>
This	O
practice	O
is	O
automatic	O
in	O
Visual	B-Application
Studio	I-Application
and	O
other	O
IDEs	O
,	O
though	O
the	O
user	O
can	O
change	O
the	O
code-behind	O
page	O
name	O
.	O
</s>
<s>
Also	O
,	O
in	O
the	O
web	O
application	O
format	O
,	O
the	O
pagename.aspx.cs	O
is	O
a	O
partial	O
class	O
that	O
is	O
linked	O
to	O
the	O
pagename.designer.cs	O
file	B-Operating_System
.	O
</s>
<s>
The	O
designer	O
file	B-Operating_System
is	O
a	O
file	B-Operating_System
that	O
is	O
autogenerated	O
from	O
the	O
ASPX	B-Application
page	O
and	O
allows	O
the	O
programmer	O
to	O
reference	O
components	O
in	O
the	O
ASPX	B-Application
page	O
from	O
the	O
code-behind	O
page	O
without	O
having	O
to	O
declare	O
them	O
manually	O
,	O
as	O
was	O
necessary	O
in	O
ASP.NET	B-Application
versions	O
before	O
version	O
2	O
.	O
</s>
<s>
ASP.NET	B-Application
'	O
s	O
code-behind	O
model	O
marks	O
a	O
departure	O
from	O
Classic	B-General_Concept
ASP	I-General_Concept
in	O
that	O
it	O
encourages	O
developers	O
to	O
build	O
applications	O
with	O
separation	O
of	O
presentation	O
and	O
content	O
in	O
mind	O
.	O
</s>
<s>
A	O
directive	O
is	O
a	O
special	O
instruction	O
on	O
how	O
ASP.NET	B-Application
should	O
process	B-Operating_System
the	O
page	O
.	O
</s>
<s>
The	O
most	O
common	O
directive	O
is	O
<%@ Page %>	O
,	O
which	O
can	O
specify	O
many	O
attributes	O
used	O
by	O
the	O
ASP.NET	B-Application
page	O
parser	O
and	O
compiler	O
.	O
</s>
<s>
User	B-Application
controls	I-Application
are	O
encapsulations	O
of	O
sections	O
of	O
page	O
sections	O
that	O
are	O
registered	O
and	O
used	O
as	O
controls	O
in	O
ASP.NET	B-Application
.	O
</s>
<s>
Programmers	O
can	O
also	O
build	O
custom	O
controls	O
for	O
ASP.NET	B-Application
applications	O
.	O
</s>
<s>
Unlike	O
user	B-Application
controls	I-Application
,	O
these	O
controls	O
do	O
not	O
have	O
an	O
ASCX	B-Application
markup	O
file	B-Operating_System
,	O
having	O
all	O
their	O
code	O
compiled	O
into	O
a	O
dynamic	O
link	O
library	O
(	O
DLL	O
)	O
file	B-Operating_System
.	O
</s>
<s>
Such	O
custom	O
controls	O
can	O
be	O
used	O
across	O
multiple	O
Web	O
applications	O
and	O
Visual	B-Application
Studio	I-Application
2013	I-Application
projects	O
.	O
</s>
<s>
.NET	B-Application
uses	O
a	O
"	O
visited	O
composites	O
"	O
rendering	O
technique	O
.	O
</s>
<s>
During	O
compilation	O
,	O
the	O
template	B-Application
(	O
.aspx	B-Application
)	O
file	B-Operating_System
is	O
compiled	O
into	O
initialization	O
code	O
that	O
builds	O
a	O
control	O
tree	O
(	O
the	O
composite	O
)	O
representing	O
the	O
original	O
template	B-Application
.	O
</s>
<s>
Literal	O
text	O
goes	O
into	O
instances	O
of	O
the	O
Literal	O
control	O
class	O
,	O
and	O
server	B-Application
controls	O
are	O
represented	O
by	O
instances	O
of	O
a	O
specific	O
control	O
class	O
.	O
</s>
<s>
The	O
resulting	O
HTML	B-Language
output	O
is	O
sent	O
to	O
the	O
client	O
.	O
</s>
<s>
This	O
is	O
a	O
source	O
of	O
confusion	O
among	O
novice	O
ASP.NET	B-Application
programmers	O
who	O
rely	O
on	O
the	O
class	O
instance	O
members	O
that	O
are	O
lost	O
with	O
every	O
page	O
request/response	O
cycle	O
.	O
</s>
<s>
ASP.NET	B-Application
applications	O
are	O
hosted	O
by	O
a	O
Web	B-Application
server	I-Application
and	O
are	O
accessed	O
using	O
the	O
stateless	B-Protocol
HTTP	B-Protocol
protocol	I-Protocol
.	O
</s>
<s>
As	O
such	O
,	O
if	O
an	O
application	O
uses	O
stateful	B-Application
interaction	O
,	O
it	O
has	O
to	O
implement	O
state	B-Application
management	I-Application
on	O
its	O
own	O
.	O
</s>
<s>
ASP.NET	B-Application
provides	O
various	O
functions	O
for	O
state	B-Application
management	I-Application
.	O
</s>
<s>
Conceptually	O
,	O
Microsoft	O
treats	O
"	O
state	B-Application
"	O
as	O
GUI	B-Application
state	B-Application
.	O
</s>
<s>
Problems	O
may	O
arise	O
if	O
an	O
application	O
must	O
track	O
"	O
data	B-Application
state	I-Application
"	O
;	O
for	O
example	O
,	O
a	O
finite-state	B-Architecture
machine	I-Architecture
that	O
may	O
be	O
in	O
a	O
transient	O
state	B-Application
between	O
requests	O
(	O
lazy	O
evaluation	O
)	O
or	O
takes	O
a	O
long	O
time	O
to	O
initialize	O
.	O
</s>
<s>
State	B-Application
management	I-Application
in	O
ASP.NET	B-Application
pages	O
with	O
authentication	O
can	O
make	O
Web	B-Application
scraping	I-Application
difficult	O
or	O
impossible	O
.	O
</s>
<s>
Application	B-Application
state	I-Application
is	O
held	O
by	O
a	O
collection	O
of	O
shared	O
user-defined	O
variables	O
.	O
</s>
<s>
Application	B-Application
state	I-Application
variables	O
are	O
accessed	O
using	O
the	O
Applications	O
collection	O
,	O
which	O
provides	O
a	O
wrapper	O
for	O
the	O
application	B-Application
state	I-Application
.	O
</s>
<s>
Application	B-Application
state	I-Application
variables	O
are	O
identified	O
by	O
name	O
.	O
</s>
<s>
Application	O
is	O
state	B-Application
management	I-Application
.	O
</s>
<s>
Server-side	O
session	O
state	B-Application
is	O
held	O
by	O
a	O
collection	O
of	O
user-defined	O
session	O
variables	O
that	O
are	O
persistent	O
during	O
a	O
user	O
session	O
.	O
</s>
<s>
Client-side	O
user	O
session	O
is	O
maintained	O
by	O
either	O
a	O
cookie	B-Application
or	O
by	O
encoding	O
the	O
session	O
ID	O
in	O
the	O
URL	O
itself	O
.	O
</s>
<s>
ASP.NET	B-Application
supports	O
three	O
modes	O
of	O
persistence	O
for	O
server-side	O
session	O
variables	O
:	O
</s>
<s>
In-process	O
mode	O
The	O
session	O
variables	O
are	O
maintained	O
within	O
the	O
ASP.NET	B-Application
process	B-Operating_System
.	O
</s>
<s>
This	O
is	O
the	O
fastest	O
way	O
;	O
however	O
,	O
in	O
this	O
mode	O
the	O
variables	O
are	O
destroyed	O
when	O
the	O
ASP.NET	B-Application
process	B-Operating_System
is	O
recycled	O
or	O
shut	O
down	O
.	O
</s>
<s>
State	B-Application
server	B-Application
mode	O
ASP.NET	B-Application
runs	O
a	O
separate	O
Windows	B-Application
service	O
that	O
maintains	O
the	O
state	B-Application
variables	O
.	O
</s>
<s>
Because	O
state	B-Application
management	I-Application
happens	O
outside	O
the	O
ASP.NET	B-Application
process	B-Operating_System
,	O
and	O
because	O
the	O
ASP.NET	B-Application
engine	O
accesses	O
data	O
using	O
.NET	B-Application
Remoting	O
,	O
ASPState	O
is	O
slower	O
than	O
In-Process	O
.	O
</s>
<s>
This	O
mode	O
allows	O
an	O
ASP.NET	B-Application
application	O
to	O
be	O
load-balanced	O
and	O
scaled	O
across	O
multiple	O
servers	O
.	O
</s>
<s>
Because	O
the	O
state	B-Application
management	I-Application
service	O
runs	O
independently	O
of	O
ASP.NET	B-Application
,	O
the	O
session	O
variables	O
can	O
persist	O
across	O
ASP.NET	B-Application
process	B-Operating_System
shutdowns	O
.	O
</s>
<s>
However	O
,	O
since	O
session	O
state	B-Application
server	B-Application
runs	O
as	O
one	O
instance	O
,	O
it	O
is	O
still	O
one	O
point	O
of	O
failure	O
for	O
session	O
state	B-Application
.	O
</s>
<s>
The	O
session-state	O
service	O
cannot	O
be	O
load-balanced	O
,	O
and	O
there	O
are	O
restrictions	O
on	O
types	O
that	O
can	O
be	O
stored	O
in	O
a	O
session	O
variable	O
.	O
</s>
<s>
SQL	B-Application
Server	I-Application
mode	O
State	B-Application
variables	O
are	O
stored	O
in	O
a	O
database	O
,	O
allowing	O
session	O
variables	O
to	O
be	O
persisted	O
across	O
ASP.NET	B-Application
process	B-Operating_System
shutdowns	O
.	O
</s>
<s>
The	O
main	O
advantage	O
of	O
this	O
mode	O
is	O
that	O
it	O
allows	O
the	O
application	O
to	O
balance	O
load	O
on	O
a	O
server	B-Application
cluster	O
,	O
sharing	O
sessions	O
between	O
servers	O
.	O
</s>
<s>
This	O
is	O
the	O
slowest	O
method	B-Language
of	O
session	O
state	B-Application
management	I-Application
in	O
ASP.NET	B-Application
.	O
</s>
<s>
ASP.NET	B-Application
session	O
state	B-Application
enables	O
you	O
to	O
store	O
and	O
retrieve	O
values	O
for	O
a	O
user	O
as	O
the	O
user	O
navigates	O
ASP.NET	B-Application
pages	O
in	O
a	O
Web	O
application	O
.	O
</s>
<s>
HTTP	B-Protocol
is	O
a	O
stateless	B-Protocol
protocol	I-Protocol
.	O
</s>
<s>
This	O
means	O
that	O
a	O
Web	B-Application
server	I-Application
treats	O
each	O
HTTP	B-Protocol
request	O
for	O
a	O
page	O
as	O
an	O
independent	O
request	O
.	O
</s>
<s>
The	O
server	B-Application
retains	O
no	O
knowledge	O
of	O
variable	O
values	O
that	O
were	O
used	O
during	O
previous	O
requests	O
.	O
</s>
<s>
ASP.NET	B-Application
session	O
state	B-Application
identifies	O
requests	O
from	O
the	O
same	O
browser	O
during	O
a	O
limited	O
time	O
window	O
as	O
a	O
session	O
,	O
and	O
provides	O
a	O
way	O
to	O
persist	O
variable	O
values	O
for	O
the	O
duration	O
of	O
that	O
session	O
.	O
</s>
<s>
By	O
default	O
,	O
ASP.NET	B-Application
session	O
state	B-Application
is	O
enabled	O
for	O
all	O
ASP.NET	B-Application
applications	O
.	O
</s>
<s>
Alternatives	O
to	O
session	O
state	B-Application
include	O
the	O
following	O
:	O
</s>
<s>
Application	B-Application
state	I-Application
,	O
which	O
stores	O
variables	O
that	O
can	O
be	O
accessed	O
by	O
all	O
users	O
of	O
an	O
ASP.NET	B-Application
application	O
.	O
</s>
<s>
ASP.NET	B-Application
caching	B-Protocol
,	O
which	O
stores	O
values	O
in	O
memory	O
that	O
is	O
available	O
to	O
all	O
ASP.NET	B-Application
applications	O
.	O
</s>
<s>
View	O
state	B-Application
,	O
which	O
persists	O
values	O
in	O
a	O
page	O
.	O
</s>
<s>
Cookies	B-Application
.	O
</s>
<s>
The	O
query	B-Protocol
string	I-Protocol
and	O
fields	O
on	O
an	O
HTML	B-Language
form	O
that	O
are	O
available	O
from	O
an	O
HTTP	B-Protocol
request	O
.	O
</s>
<s>
View	O
state	B-Application
refers	O
to	O
the	O
page-level	O
state	B-Application
management	I-Application
mechanism	O
,	O
utilized	O
by	O
the	O
HTML	B-Language
pages	O
emitted	O
by	O
ASP.NET	B-Application
applications	O
to	O
maintain	O
the	O
state	B-Application
of	O
the	O
Web	O
form	O
controls	O
and	O
widgets	O
.	O
</s>
<s>
The	O
state	B-Application
of	O
the	O
controls	O
is	O
encoded	O
and	O
sent	O
to	O
the	O
server	B-Application
at	O
every	O
form	O
submission	O
in	O
a	O
hidden	O
field	O
known	O
as	O
__VIEWSTATE	O
.	O
</s>
<s>
The	O
server	B-Application
sends	O
back	O
the	O
variable	O
so	O
that	O
,	O
when	O
the	O
page	O
is	O
re-rendered	O
,	O
the	O
controls	O
render	O
at	O
their	O
last	O
state	B-Application
.	O
</s>
<s>
At	O
the	O
server	B-Application
side	O
,	O
the	O
application	O
may	O
change	O
the	O
viewstate	O
,	O
if	O
the	O
processing	O
requires	O
a	O
change	O
of	O
state	B-Application
of	O
any	O
control	O
.	O
</s>
<s>
The	O
states	O
of	O
individual	O
controls	O
are	O
decoded	O
at	O
the	O
server	B-Application
,	O
and	O
are	O
available	O
for	O
use	O
in	O
ASP.NET	B-Application
pages	O
using	O
the	O
ViewState	O
collection	O
.	O
</s>
<s>
View	O
state	B-Application
is	O
turned	O
on	O
by	O
default	O
and	O
normally	O
serializes	B-Application
the	O
data	O
in	O
every	O
control	O
on	O
the	O
page	O
regardless	O
of	O
whether	O
it	O
is	O
actually	O
used	O
during	O
a	O
postback	O
.	O
</s>
<s>
This	O
behavior	O
can	O
(	O
and	O
should	O
)	O
be	O
modified	O
,	O
however	O
,	O
as	O
View	O
state	B-Application
can	O
be	O
disabled	O
on	O
a	O
per-control	O
,	O
per-page	O
,	O
or	O
server-wide	O
basis	O
.	O
</s>
<s>
Developers	O
need	O
to	O
be	O
wary	O
of	O
storing	O
sensitive	O
or	O
private	O
information	O
in	O
the	O
View	O
state	B-Application
of	O
a	O
page	O
or	O
control	O
,	O
as	O
the	O
Base64	B-Protocol
string	O
containing	O
the	O
view	O
state	B-Application
data	O
can	O
easily	O
be	O
de-serialized	O
.	O
</s>
<s>
By	O
default	O
,	O
View	O
state	B-Application
does	O
not	O
encrypt	O
the	O
__VIEWSTATE	O
value	O
.	O
</s>
<s>
Encryption	O
can	O
be	O
enabled	O
on	O
a	O
server-wide	O
(	O
and	O
server-specific	O
)	O
basis	O
,	O
allowing	O
for	O
a	O
certain	O
level	O
of	O
security	O
to	O
be	O
maintained	O
.	O
</s>
<s>
ASP.NET	B-Application
offers	O
a	O
"	O
Cache	O
"	O
object	O
that	O
is	O
shared	O
across	O
the	O
application	O
and	O
can	O
also	O
be	O
used	O
to	O
store	O
various	O
objects	O
.	O
</s>
<s>
Other	O
means	O
of	O
state	B-Application
management	I-Application
that	O
are	O
supported	O
by	O
ASP.NET	B-Application
are	O
cookies	B-Application
,	O
caching	B-Protocol
,	O
and	O
the	O
query	B-Protocol
string	I-Protocol
.	O
</s>
<s>
When	O
first	O
released	O
,	O
ASP.NET	B-Application
lacked	O
a	O
template	B-Application
engine	I-Application
.	O
</s>
<s>
Because	O
the	O
.NET	B-Application
Framework	I-Application
is	O
object-oriented	B-Language
and	O
allows	O
for	O
inheritance	B-Language
,	O
many	O
developers	O
would	O
define	O
a	O
new	O
base	O
class	O
that	O
inherits	O
from	O
"	O
System.Web.UI.Page	O
"	O
,	O
write	O
methods	O
there	O
that	O
render	O
HTML	B-Language
,	O
and	O
then	O
make	O
the	O
pages	O
in	O
their	O
application	O
inherit	O
from	O
this	O
new	O
class	O
.	O
</s>
<s>
Furthermore	O
,	O
this	O
method	B-Language
can	O
only	O
be	O
visually	O
tested	O
by	O
running	O
the	O
application	O
–	O
not	O
while	O
designing	O
it	O
.	O
</s>
<s>
Other	O
developers	O
have	O
used	O
include	B-Language
files	I-Language
and	O
other	O
tricks	O
to	O
avoid	O
having	O
to	O
implement	O
the	O
same	O
navigation	O
and	O
other	O
elements	O
in	O
every	O
page	O
.	O
</s>
<s>
ASP.NET	B-Application
2.0	I-Application
introduced	O
the	O
concept	O
of	O
master	O
pages	O
,	O
which	O
allow	O
for	O
template-based	O
page	O
development	O
.	O
</s>
<s>
A	O
Web	O
application	O
can	O
have	O
one	O
or	O
more	O
master	O
pages	O
,	O
which	O
,	O
beginning	O
with	O
ASP.NET	B-Application
2.0	I-Application
,	O
can	O
be	O
nested	O
.	O
</s>
<s>
Master	O
templates	O
have	O
place-holder	O
controls	O
,	O
called	O
ContentPlaceHolders	O
to	O
denote	O
where	O
the	O
dynamic	O
content	O
goes	O
,	O
as	O
well	O
as	O
HTML	B-Language
and	O
JavaScript	B-Language
shared	O
across	O
child	O
pages	O
.	O
</s>
<s>
The	O
rest	O
of	O
the	O
page	O
is	O
defined	O
by	O
the	O
shared	O
parts	O
of	O
the	O
master	O
page	O
,	O
much	O
like	O
a	O
mail	B-Application
merge	I-Application
in	O
a	O
word	B-General_Concept
processor	I-General_Concept
.	O
</s>
<s>
All	O
markup	O
and	O
server	B-Application
controls	O
in	O
the	O
content	O
page	O
must	O
be	O
placed	O
within	O
the	O
ContentPlaceHolder	O
control	O
.	O
</s>
<s>
When	O
a	O
request	O
is	O
made	O
for	O
a	O
content	O
page	O
,	O
ASP.NET	B-Application
merges	O
the	O
output	O
of	O
the	O
content	O
page	O
with	O
the	O
output	O
of	O
the	O
master	O
page	O
,	O
and	O
sends	O
the	O
output	O
to	O
the	O
user	O
.	O
</s>
<s>
This	O
means	O
that	O
the	O
content	O
page	O
may	O
still	O
manipulate	O
headers	O
,	O
change	O
title	O
,	O
configure	O
caching	B-Protocol
,	O
etc	O
.	O
</s>
<s>
Other	O
file	B-Operating_System
extensions	O
associated	O
with	O
different	O
versions	O
of	O
ASP.NET	B-Application
include	O
:	O
</s>
<s>
Extension	O
Introduced	O
in	O
version	O
Description	O
asax	O
1.0	O
This	O
is	O
the	O
global	O
application	O
file.You	O
can	O
use	O
this	O
file	B-Operating_System
to	O
define	O
global	O
variables	O
(	O
Variable	O
that	O
can	O
be	O
accessed	O
from	O
any	O
Web	O
page	O
in	O
the	O
Web	O
application	O
.	O
)	O
</s>
<s>
It	O
is	O
mostly	O
used	O
to	O
define	O
the	O
overall	O
application	O
event	O
related	O
to	O
application	O
&	O
session	O
object.Global.asax	O
,	O
used	O
for	O
application-level	O
logic	O
ascx	B-Application
1.0	O
User	B-Application
Control	I-Application
,	O
used	O
for	O
User	B-Application
Control	I-Application
files	O
logic	O
ashx	B-Application
1.0	O
Custom	O
HTTP	B-Protocol
handlers	O
do	O
not	O
have	O
a	O
user	B-Application
interface	I-Application
.	O
</s>
<s>
From	O
version	O
2.0	O
a	O
Code	O
behind	O
page	O
of	O
an	O
asmx	O
file	B-Operating_System
is	O
placed	O
into	O
the	O
app_code	O
folder	O
.	O
</s>
<s>
aspx	B-Application
1.0	O
An	O
ASP.NET	B-Application
Web	I-Application
Forms	I-Application
page	O
that	O
can	O
contain	O
Web	O
controls	O
and	O
presentation	O
and	O
business	O
logic	O
.	O
</s>
<s>
http://msdn.microsoft.com/en-us/library/2wawkw1c.aspx	O
axd	O
1.0	O
When	O
enabled	O
in	O
web.config	O
requesting	O
trace.axd	O
outputs	O
application-level	O
tracing	O
.	O
</s>
<s>
Also	O
used	O
for	O
the	O
special	O
webresource.axd	O
handler	O
,	O
which	O
allows	O
control/component	O
developers	O
to	O
package	O
a	O
component/control	O
complete	O
with	O
images	O
,	O
script	O
,	O
css	B-Language
,	O
etc	O
.	O
</s>
<s>
for	O
deployment	O
in	O
one	O
file	B-Operating_System
(	O
an	O
'	O
assembly	O
 '	O
)	O
browser	O
2.0	O
Browser	O
capabilities	O
files	O
stored	O
in	O
XML	B-Protocol
format	O
;	O
introduced	O
in	O
version	O
2.0	O
.	O
</s>
<s>
ASP.NET	B-Application
2	O
includes	O
many	O
of	O
these	O
by	O
default	O
,	O
to	O
support	O
common	O
Web	O
browsers	O
.	O
</s>
<s>
These	O
specify	O
which	O
browsers	O
have	O
which	O
abilities	O
,	O
so	O
that	O
ASP.NET	B-Application
2	O
can	O
automatically	O
customize	O
and	O
optimize	O
its	O
output	O
accordingly	O
.	O
</s>
<s>
Replaces	O
the	O
harder-to-use	O
BrowserCaps	O
section	O
that	O
was	O
in	O
machine.config	O
and	O
could	O
be	O
overridden	O
in	O
web.config	O
in	O
ASP.NET	B-Application
1.x	O
.	O
</s>
<s>
config	O
1.0	O
web.config	O
is	O
the	O
only	O
file	B-Operating_System
in	O
a	O
specific	O
Web	O
application	O
to	O
use	O
this	O
extension	O
by	O
default	O
(	O
machine.config	O
similarly	O
affects	O
the	O
entire	O
Web	B-Application
server	I-Application
and	O
all	O
applications	O
on	O
it	O
)	O
,	O
however	O
ASP.NET	B-Application
provides	O
facilities	O
to	O
create	O
and	O
consume	O
other	O
config	O
files	O
.	O
</s>
<s>
These	O
are	O
stored	O
in	O
XML	B-Protocol
format	O
.	O
</s>
<s>
cs/vb/fs	O
1.0	O
Code	O
files	O
(	O
cs	B-Application
indicates	O
C#	B-Application
,	O
vb	O
indicates	O
Visual	B-Language
Basic	I-Language
,	O
fs	O
indicates	O
F#	O
)	O
.	O
</s>
<s>
Code	O
behind	O
files	O
(	O
see	O
above	O
)	O
predominantly	O
have	O
the	O
extension	O
"	O
.aspx.cs	O
"	O
or	O
"	O
.aspx.vb	O
"	O
for	O
the	O
two	O
most	O
common	O
languages	O
.	O
</s>
<s>
Other	O
code	O
files	O
(	O
often	O
containing	O
common	O
"	O
library	O
"	O
classes	O
)	O
can	O
also	O
exist	O
in	O
the	O
Web	O
folders	O
with	O
the	O
cs/vb	O
extension	O
.	O
</s>
<s>
In	O
ASP.NET	B-Application
2	O
these	O
should	O
be	O
placed	O
inside	O
the	O
App_Code	O
folder	O
where	O
they	O
are	O
dynamically	O
compiled	O
and	O
available	O
to	O
the	O
whole	O
application	O
.	O
</s>
<s>
cshtml	O
4.1	O
Views	O
(	O
mixed	O
C#	B-Application
and	O
HTML	B-Language
using	O
Razor	B-Application
syntax	O
)	O
dbml	O
3.5	O
LINQ	B-Language
to	I-Language
SQL	I-Language
data	O
classes	O
file	B-Operating_System
edmx	O
3.5	O
ADO.NET	B-Application
Entity	I-Application
Framework	I-Application
model	O
master	O
2.0	O
Master	O
page	O
file	B-Operating_System
.	O
</s>
<s>
Default	O
file	B-Operating_System
name	O
is	O
Master1.master	O
resx	O
1.0	O
Resource	O
files	O
for	O
internationalization	B-General_Concept
and	I-General_Concept
localization	I-General_Concept
.	O
</s>
<s>
Resource	O
files	O
can	O
be	O
global	O
(	O
e.g.	O
,	O
messages	O
)	O
or	O
local	O
,	O
which	O
means	O
specific	O
for	O
one	O
aspx	B-Application
or	O
ascx	B-Application
file	B-Operating_System
.	O
</s>
<s>
Default	O
file	B-Operating_System
name	O
is	O
web.sitemap	O
skin	O
2.0	O
Theme	O
skin	O
files	O
.	O
</s>
<s>
In	O
general	O
,	O
the	O
ASP.NET	B-Application
directory	O
structure	O
can	O
be	O
determined	O
by	O
the	O
developer	O
's	O
preferences	O
.	O
</s>
<s>
Although	O
ASP.NET	B-Application
provides	O
means	O
for	O
intercepting	O
the	O
request	O
at	O
any	O
point	O
during	O
processing	O
,	O
the	O
developer	O
is	O
not	O
forced	O
to	O
funnel	O
requests	O
through	O
a	O
central	O
application	O
or	O
front	O
controller	O
.	O
</s>
<s>
The	O
special	O
directory	O
names	O
(	O
from	O
ASP.NET	B-Application
2.0	I-Application
on	O
)	O
are	O
:	O
</s>
<s>
The	O
ASP.NET	B-Application
server	B-Application
automatically	O
compiles	O
files	O
(	O
and	O
subdirectories	O
)	O
in	O
this	O
folder	O
into	O
an	O
assembly	O
accessible	O
in	O
the	O
code	O
of	O
every	O
page	O
of	O
the	O
site	O
.	O
</s>
<s>
Also	O
any	O
site-specific	O
http	B-Protocol
handlers	O
and	O
modules	O
and	O
Web	O
service	O
implementation	O
go	O
in	O
this	O
directory	O
.	O
</s>
<s>
App_Data	O
The	O
App_Data	O
ASP.NET	B-Application
Directory	O
is	O
the	O
default	O
directory	O
for	O
any	O
database	O
used	O
by	O
the	O
ASP.NET	B-Application
Website	O
.	O
</s>
<s>
These	O
databases	O
might	O
include	O
Access	O
(	O
mdb	O
)	O
files	O
or	O
SQL	B-Application
Server	I-Application
(	O
mdf	O
)	O
files	O
.	O
</s>
<s>
The	O
App_Data	O
is	O
the	O
only	O
directory	O
with	O
Write	O
Access	O
enabled	O
for	O
the	O
ASP.NET	B-Application
web	O
application	O
.	O
</s>
<s>
This	O
is	O
where	O
the	O
ASP.NET	B-Application
developer	O
typically	O
stores	O
localized	O
messages	O
,	O
etc	O
.	O
</s>
<s>
App_LocalResources	O
E.g.	O
,	O
a	O
file	B-Operating_System
called	O
CheckOut.aspx.fr-FR.resx	O
holds	O
localized	O
resources	O
for	O
the	O
French	O
version	O
of	O
the	O
CheckOut.aspx	O
page	O
.	O
</s>
<s>
When	O
the	O
UI	O
culture	O
is	O
set	O
to	O
French	O
,	O
ASP.NET	B-Application
automatically	O
finds	O
and	O
uses	O
this	O
file	B-Operating_System
for	O
localization	O
.	O
</s>
<s>
App_Offline.htm	O
A	O
file	B-Operating_System
(	O
not	O
a	O
directory	O
)	O
that	O
disables	O
the	O
application	O
by	O
returning	O
the	O
contents	O
of	O
the	O
file	B-Operating_System
for	O
any	O
application	O
request	O
.	O
</s>
<s>
App_Themes	O
Adds	O
a	O
folder	O
that	O
holds	O
files	O
related	O
to	O
themes	O
,	O
which	O
is	O
a	O
new	O
ASP.NET	B-Application
feature	O
that	O
helps	O
ensure	O
a	O
consistent	O
appearance	O
throughout	O
a	O
Web	O
site	O
and	O
makes	O
it	O
easier	O
to	O
change	O
the	O
Web	O
site	O
's	O
appearance	O
when	O
necessary	O
.	O
</s>
<s>
ASP.NET	B-Application
aims	O
for	O
performance	O
benefits	O
over	O
other	O
script-based	O
technologies	O
(	O
including	O
Classic	B-General_Concept
ASP	I-General_Concept
)	O
by	O
compiling	O
the	O
server-side	O
code	O
the	O
first	O
time	O
it	O
is	O
used	O
to	O
one	O
or	O
more	O
DLL	O
files	O
on	O
the	O
Web	B-Application
server	I-Application
.	O
</s>
<s>
These	O
dll	O
files	O
or	O
assemblies	O
contain	O
Microsoft	O
Intermediate	O
Language	O
(	O
MSIL	O
)	O
for	O
running	O
within	O
the	O
common	O
language	O
runtime	O
;	O
this	O
provides	O
a	O
performance	O
boost	O
over	O
pure	O
scripted	B-Language
languages	I-Language
and	O
is	O
similar	O
to	O
the	O
approach	O
used	O
by	O
Python	O
and	O
not	O
dissimilar	O
to	O
JavaServer	B-Language
Pages	I-Language
.	O
</s>
<s>
This	O
feature	O
provides	O
the	O
ease	O
of	O
development	O
offered	O
by	O
scripting	B-Language
languages	I-Language
with	O
the	O
performance	O
benefits	O
of	O
a	O
compiled	O
binary	O
.	O
</s>
<s>
However	O
,	O
the	O
compilation	O
might	O
cause	O
a	O
noticeable	O
but	O
short	O
delay	O
to	O
the	O
user	O
when	O
the	O
newly	O
edited	O
page	O
is	O
first	O
requested	O
from	O
the	O
Web	B-Application
server	I-Application
,	O
but	O
not	O
again	O
unless	O
the	O
requested	O
page	O
updates	O
further	O
.	O
</s>
<s>
The	O
ASPX	B-Application
and	O
other	O
resource	O
files	O
are	O
placed	O
in	O
a	O
virtual	O
host	O
on	O
an	O
Internet	B-Application
Information	I-Application
Services	I-Application
server	B-Application
(	O
or	O
other	O
compatible	O
ASP.NET	B-Application
servers	O
;	O
see	O
Other	O
implementations	O
,	O
below	O
)	O
.	O
</s>
<s>
The	O
first	O
time	O
a	O
client	O
requests	O
a	O
page	O
,	O
the	O
.NET	B-Application
Framework	I-Application
parses	O
and	O
compiles	O
the	O
file(s )	O
into	O
a	O
.NET	B-Application
assembly	O
and	O
sends	O
the	O
response	O
;	O
subsequent	O
requests	O
are	O
served	O
from	O
the	O
DLL	O
files	O
.	O
</s>
<s>
By	O
default	O
ASP.NET	B-Application
compiles	O
the	O
entire	O
site	O
in	O
batches	O
of	O
1000	O
files	O
upon	O
first	O
request	O
.	O
</s>
<s>
Developers	O
can	O
also	O
choose	O
to	O
pre-compile	O
their	O
"	O
codebehind	O
"	O
files	O
before	O
deployment	O
,	O
using	O
Microsoft	B-Application
Visual	I-Application
Studio	I-Application
,	O
eliminating	O
the	O
need	O
for	O
just-in-time	O
compilation	O
in	O
a	O
production	O
environment	O
.	O
</s>
<s>
This	O
also	O
eliminates	O
the	O
need	O
of	O
having	O
the	O
source	O
code	O
on	O
the	O
Web	B-Application
server	I-Application
.	O
</s>
<s>
ASP.NET	B-Application
WebForms	O
simplifies	O
developers	O
 '	O
transition	O
from	O
Windows	B-Application
application	O
development	O
to	O
Web	O
development	O
by	O
offering	O
the	O
ability	O
to	O
build	O
pages	O
composed	O
of	O
controls	O
similar	O
to	O
a	O
Windows	B-Application
user	B-Application
interface	I-Application
.	O
</s>
<s>
A	O
Web	O
control	O
,	O
such	O
as	O
a	O
button	O
or	O
label	O
,	O
functions	O
in	O
very	O
much	O
the	O
same	O
way	O
as	O
its	O
Windows	B-Application
counterparts	O
:	O
code	O
can	O
assign	O
its	O
properties	O
and	O
respond	O
to	O
its	O
events	O
.	O
</s>
<s>
Controls	O
know	O
how	O
to	O
render	O
themselves	O
:	O
whereas	O
Windows	B-Application
controls	O
draw	O
themselves	O
to	O
the	O
screen	O
,	O
web	O
controls	O
produce	O
segments	O
of	O
HTML	B-Language
and	O
JavaScript	B-Language
that	O
form	O
parts	O
of	O
the	O
resulting	O
page	O
sent	O
to	O
the	O
end-user	O
'	O
s	O
browser	O
.	O
</s>
<s>
ASP.NET	B-Application
WebForms	O
encourages	O
the	O
programmer	O
to	O
develop	O
applications	O
using	O
an	O
event-driven	B-Application
GUI	B-Application
model	O
,	O
rather	O
than	O
in	O
conventional	O
Web-scripting	O
environments	O
like	O
ASP	B-General_Concept
and	O
PHP	B-Application
.	O
</s>
<s>
The	O
framework	O
combines	O
existing	O
technologies	O
such	O
as	O
JavaScript	B-Language
with	O
internal	O
components	O
like	O
"	O
ViewState	O
"	O
to	O
bring	O
persistent	O
(	O
inter-request	O
)	O
state	B-Application
to	O
the	O
inherently	O
stateless	B-Protocol
Web	O
environment	O
.	O
</s>
<s>
Other	O
differences	O
compared	O
to	O
Classic	B-General_Concept
ASP	I-General_Concept
are	O
:	O
</s>
<s>
Significantly	O
improved	O
run-time	O
error	B-General_Concept
handling	I-General_Concept
,	O
making	O
use	O
of	O
exception	B-General_Concept
handling	I-General_Concept
using	O
try-catch	B-General_Concept
blocks	I-General_Concept
.	O
</s>
<s>
Similar	O
metaphors	O
to	O
Microsoft	B-Application
Windows	I-Application
applications	O
such	O
as	O
controls	O
and	O
events	O
.	O
</s>
<s>
ASP.NET	B-Application
uses	O
the	O
multi-language	O
abilities	O
of	O
the	O
.NET	B-Application
Common	O
Language	O
Runtime	O
,	O
allowing	O
Web	O
pages	O
to	O
be	O
coded	O
in	O
VB.NET	B-Language
,	O
C#	B-Application
,	O
F#	O
,	O
Delphi.NET	O
,	O
etc	O
.	O
</s>
<s>
If	O
an	O
ASP.NET	B-Application
application	O
leaks	B-Error_Name
memory	I-Error_Name
,	O
the	O
ASP.NET	B-Application
runtime	O
unloads	O
the	O
AppDomain	O
hosting	O
the	O
erring	O
application	O
and	O
reloads	O
the	O
application	O
in	O
a	O
new	O
AppDomain	O
.	O
</s>
<s>
Session	O
state	B-Application
in	O
ASP.NET	B-Application
can	O
be	O
saved	O
in	O
a	O
Microsoft	B-Application
SQL	I-Application
Server	I-Application
database	O
or	O
in	O
a	O
separate	O
process	B-Operating_System
running	O
on	O
the	O
same	O
machine	O
as	O
the	O
Web	B-Application
server	I-Application
or	O
on	O
a	O
different	O
machine	O
.	O
</s>
<s>
That	O
way	O
session	O
values	O
are	O
not	O
lost	O
when	O
the	O
Web	B-Application
server	I-Application
is	O
reset	O
or	O
the	O
ASP.NET	B-Application
worker	O
process	B-Operating_System
is	O
recycled	O
.	O
</s>
<s>
Versions	O
of	O
ASP.NET	B-Application
prior	O
to	O
2.0	O
were	O
criticized	O
for	O
their	O
lack	O
of	O
standards	O
compliance	O
.	O
</s>
<s>
The	O
generated	O
HTML	B-Language
and	O
JavaScript	B-Language
sent	O
to	O
the	O
client	O
browser	O
would	O
not	O
always	O
validate	O
against	O
W3C/ECMA	O
standards	O
.	O
</s>
<s>
In	O
addition	O
,	O
the	O
framework	O
's	O
browser	O
detection	O
feature	O
sometimes	O
incorrectly	O
identified	O
Web	O
browsers	O
other	O
than	O
Microsoft	O
's	O
own	O
Internet	B-Application
Explorer	I-Application
as	O
"	O
downlevel	O
"	O
and	O
returned	O
HTML/JavaScript	O
to	O
these	O
clients	O
with	O
some	O
of	O
the	O
features	O
removed	O
,	O
or	O
sometimes	O
crippled	O
or	O
broken	O
.	O
</s>
<s>
In	O
version	O
2.0	O
however	O
,	O
all	O
controls	O
generate	O
valid	O
HTML	B-Language
4.0	I-Language
,	O
XHTML	B-Language
1.0	I-Language
(	O
the	O
default	O
)	O
or	O
XHTML	B-Language
1.1	O
output	O
,	O
depending	O
on	O
the	O
site	O
configuration	O
.	O
</s>
<s>
Detection	O
of	O
standards-compliant	O
Web	O
browsers	O
is	O
more	O
robust	O
and	O
support	O
for	O
Cascading	B-Language
Style	I-Language
Sheets	I-Language
is	O
more	O
extensive	O
.	O
</s>
<s>
Web	B-Application
Server	I-Application
Controls	O
:	O
these	O
are	O
controls	O
introduced	O
by	O
ASP.NET	B-Application
WebForms	O
for	O
providing	O
the	O
UI	O
for	O
the	O
Web	O
form	O
.	O
</s>
<s>
These	O
controls	O
are	O
state-managed	O
controls	O
and	O
are	O
WYSIWYG	B-Application
controls	O
.	O
</s>
