Vous êtes sur la page 1sur 5

ASP(Active server Pages):

ASP is a technology comes with IIS in the form of asp.dll for server side execution.
ASP comes with 2 things
Scripting languages towards server side.
Collection of objects called asp objects
Ex: response, request, session, application & server.
ASP page (extension .asp) contains

html tags
client side code
server side code

Server side code requires unique identification:


<%= statement1 %>
Or server time : <%=time %>
It will be executed & result will be given to client.
Request object is used to read info. Comes with client request.
The info. Can be form data, cookies, browse info
Response object is used to send info. To client
The info. Can be normal text, url, cookies.
Page Submission:
Client submitting data to web server is called Page Submission.
Ex: registering users accounts, login entry
Page submission can be classified into 2 types.
1. Cross page submission:
One web page submitting to another page
2. Post Back Submission:
Web page submitting to it self.
Ex: <form method=post/get action=asp page>
</form>
Method attributes of form tag:
It will specify arrangement of data for sending to web server.
Http request
Browser .. Web server
Http header (url) + message body

1. GET will arrange data with in http header by appending to URL.


POST will arrange data with in http message body. It will not be visible.
2. GET will support max. 2 kb data.
POST supports large amount of data {No Limit}.
3. GET will not provide security for sensitive data (password type).
POST will provide security.
4. GET provides faster transmission {complete data in 1 package.}.
POST provides slow transmission.
ACTION attribute:
It will specify the web page on server to which data to be submitted.
Submit Button:
This comes with built in functionality to send request to web server.
EX: creating html page to submit data
<html>
<body>
<form method=get action=validate. asp>
User Name : <input type=text name=t1>
<br>
Password : <input type=password name=t2><br>
<input type=submit value=submit>
</form>
</body>
</html>
Save as login.html
Creating asp page to read data:
<%
Uname = request.querystring(t1)
Pwd = request.querystring(t2)
Reponse.write(welcome to & uname)
%>
Save as validate. asp.
Over.

ASP.NET
ASP.Net == ASP + .NET
ASP.Net supports ASP objects, its added with new object Cache.
These objects can be called as asp.net intenstic objects.(objects will be created
implicitly, this makes intenstic objects).
ASP.Net supports .Net high level languages for programming & base class libraries
can be used.
Server system requires 2 things towards ASP.net
IIS installation & .Net Installation.
ASP.Net :
asp.net is a technology providing set of specifications towards web based app.
Development , this technology comes with .net.
ASP.Net supports diff. types of web app.
1. Normal web app.
Web page towards pc based browser.
2. Mobile web app.
Web page towards mobile device micro browser
3. Web Services
Developing business logic towards B2B implementation.
4. AJAX web app.
Developing web pages with ajax specifications, this will avoid page submission &
reloading web pages.
The current version is ASP.Net 3.5
ASP. Net 3.5= asp.net 2.0 + AJAX + LINQ.
Silver light is not a part of Asp.net 3.5
SL is a new programming module for rich internet app. Development (RIA) which is
similar to FLASH.
RIA means implementing shapes, transformations, animations, video streams
etc.
ASP.Net extension .aspx.
Note : VC++ os not supported for server side code.
ASP supports scripting languages , these are interpreter based, execution will be
slower, it will delegate web server performance.

ASP.Net supports .NET languages , these are compiler based, he execution will be
faster .it provides the better performance.
PAGE Directive:
Directive is an instruction to server; it should be first stmt with in a web page, based
on instruction server will do required processing.
<% @ page language= enable viewstate= theme= %>
<%
Response.Write(<h1>ASP.Net using C # </h2>);
%>
Note: C# is case sensitive.
In C#, a stmt to be ended with (;).
ASP.Net Page Execution (Asp.net Architecture) :
Server system required 2 things for asp.net
1. IIS installation
2. .NET installation
.NET installation will configure IIS with a library called aspnet_isapi.dll.
Asp.net internet server application programming interface.
Aspnet_isapi.dll acts like mediate between web server & .Net
Web server does not support ASP.Net
.Net is providing aspnet_regis.exe utility to configure IIS with library[asp.net].
Go to Visual Studio 2008 , command prompt
> aspnet_regiis - i
Web server will forward asp.net page request to ASP.Net worker process using
aspnet_isapi.dll
Asp.net worker process can be called as Asp.Net run time., it will make use .net
services to process asp.net page.
WEB PAGE Techniques:
web page creation includes 2 things
1. design part

2. logic part

In asp 3.0 design part code & logic code will be placed in to single file .asp

This file will be shared web designer & web developer. This will create problems.
Application development will be slow.
No security for logic part
The solution is .,, code behind tech.
ASP.Net supports 2 techniques
1) In page tech.

2) Code behind tech.

1)In Page tech:

.aspx (design + logic part)

This is useful for migration projects.

.ASP to .ASPX

2) code behind tech.


.aspx for design part
<>.cs or <>.vb logic part
Placing design part into .aspx file & logic part in to .cs or .vb file is called code behing
technique.
Major new development takes place with code behind technique.
--------------- Over--------------------

Vous aimerez peut-être aussi