Embed
Email

ASP

Document Sample

Shared by: niusheng11
Categories
Tags
Stats
views:
1
posted:
11/27/2011
language:
English
pages:
14
ASP.NET

ASP AND .NET



 .Net is a collection of libraries, templates and

services designed to make programming

applications of all kinds, easier, more flexible

(multi platform), and more scalable

 ASP.Net is a subset of .Net that contains tools

for developing web based applications

CLIENT/SERVER OVERVIEW



 A server is a program that makes services

available to another program (a client)

 For instance, A web server such as IIS (Internet

Information Server) or Apache makes web

pages available to a client application such as

a browser

 A database server makes data available to

client that makes a valid request

CLIENT/SERVER OVERVIEW CONT.



 ASP.Net pages are served from IIS when a

browser requests an .apsx page.

 IIS passes the request to .Net which processes

the C# or VB code and ASP controls, makes any

database requests and renders them into xhtml

 IIS then sends the rendered page to the

browser that made the request

ASP.NET SERVER/CLIENT

ELEMENTS OF AN ASP PAGE



 The Page

 Web Form



 Html and ASP.Net Controls



 Code behind



 CSS

THE PAGE

 The page is the container for everything else

 An ASP application can contain several pages

 Usually the starting page is called “Default.aspx”

 Every page begins with a directive









 This directive tells IIS that the page is an ASP.Net

application

THE WEB FORM



 An ASP. Page can have only 1 form.

 A key attribute of the form is runat=“server”

which tells IIS to send it to .Net for compiling

and rendering. (Plain html elements are just

passed through to the client without any .net

processing)

 All asp controls must be contained within the

form

HTML AND ASP CONTROLS



 An ASP.Net page can use

 plain xhtml

 Xhtml controls (xhtml with the runat=“server”

attribute added)

 ASP.Net controls, controls provided by .Net Library



 Client side JavaScript

DESIGN AND SOURCE VIEWS



 ASP.net pages have two views Design and Source

 Design view shows controls approximately as they

will appear on the rendered page (some info

shown here won’t be displayed)

 Source view shows the html and the asp.net

controls.

 ASP controls are represented as XML fragments



 Controls can be added in Design or source views

XML FRAGMENT OF AN ASP CONTROL





CODE BEHIND



 ASP.Net allows you to write the code in a

separate file.

 This makes code easier to read and maintain



 The page directive tells .Net where to find the

code page.

 Code can still be placed directly in the web

page if you wish either between tags

or between brackets

CSS



 ASP.Net supports CSS and has a good CSS

editor

 CSS classes and styles can be added to a ASP

control by using the CssClass attribute



ASP PAGES AND STATE

 ASP.Net, like all web pages are stateless.

 Every time you click and button or use control that

causes postback the page is re-rendered from the

server

 Information is not retained between postbacks

without some additional programming. (Windows

forms have state. They keep their variable values

and contents in RAM)

 This has several implications for web application

development that we will have to examine later



Related docs
Other docs by niusheng11
TEXAS ADVANCED COMPUTING CENTER Safe Travels
Views: 0  |  Downloads: 0
The Trek
Views: 3  |  Downloads: 0
article-240637
Views: 0  |  Downloads: 0
work presentation 2A
Views: 2  |  Downloads: 0
snort_configure.docx - NEOHAPSIS
Views: 1  |  Downloads: 0
Southern Maine Dressage Association
Views: 1  |  Downloads: 0
Checklists for buying a used car
Views: 17  |  Downloads: 0
mis is riin The Office of Business Services
Views: 4  |  Downloads: 0
Assisted Living_6_
Views: 2  |  Downloads: 0
By registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!