Chapter2 Introducing ASP NET
Chapter2 Introducing ASP NET
DOTNET ( ASP)
History of ASP.NET
2 ASP.NE
THE WAY THE WEB WORKS
The Internet is a wonderful thing. It allows
people from all over the world to communicate
with each other via their computers.
Originally, Web sites were very simple. There
model
Model of Client-Server Architecture
The
Web Server (e.g. Microsoft IIS) Internet Client (e.g. Windows 2000)
Database
5
THE REQUEST/RESPONSE
MODEL
.
6
THE REQUEST/RESPONSE
MODEL
This model can’t provide any dynamic information or
processing. The server simply waits around for
someone to request information, and then it
returns the data that’s already stored on its hard
drive without really looking at what it’s sending.
Generally, a static Web request follows these four
steps
1.The client (the Web browser) locates a Web
server through its URL (such as
www.microsoft.com ).
2. The client requests a page (such as index.html).
3. The server sends the requested document.
4. The client receives the document and displays it.
7
THE REQUEST/RESPONSE
MODEL
Once the client has received the
information, the process is finished. The
server has no idea what’s happening on
the client ,since the server and client are
two separate computers?
They only communicate with one another
8
ENTER SERVER PROCESSING
This comes in many forms, including the
common gateway interface (CGI) and
Microsoft’s Active Server Pages (classic ASP. ).
The server takes a look at what it sends
responds to it.
THE ASP.NET DIFFERENCE
How can ASP.NET know what’s going on in
your computer? How can the server react
to things happening on the client? ASP.NET
relies on clever client-side processing to
simulate an event-driven model.
Client-Side Processing
Client-side processing occurs when you
place some programming code in an HTML
page that the client can understand.
So now you have two places to execute
frequent use.
COMPARISON OF ASP AND
ASP.NET
Inaddition, ASP.NET is now completely
object-oriented. Classic ASP strove to
introduce the concept of object-
oriented programming (OOP), but was
unable to because that was a
fundamentally different programming
paradigm.
21
SUMMARY
This section examined some typical
ASP.NET pages. We learned about the
most common parts of an ASP.NET page,
including the <%@ Page %> directive,
code declaration and render blocks, and
Web forms. These all provide the
foundation for building complex ASP.NET
pages.
The most important point to take away
programming .
What’s the difference between code
23
declaration blocks and render blocks?