ASP [Active Server Pages]
Asp is a
technology comes with IIS in the form of asp.dll for server side code
execution.
Asp comes
with 2 things
1. Scripting
languages towards server side
2.
Collection of objects called “Asp objects” example:-response, request, session,
application and server.
Asp page
extension is .asp contains
1. Html tags
2. Client
side code
3. Server
side code.
Server side
code requires unique identification
<%=
statement %> it will be executed and result will be given to client.
Creating Asp
page to display server system time:
Open a notepad
<Html>
<Body>
<h1>
Server time: <%
=time %> // time is the function of VB Script to get server time
</h1>
</Body>
</Html>
Request object is used to read information
which comes with client request
Response object is used to send information to
client the information can be normal text, url, cookies …..
Page Submission:-
Client
submitting data to the webserver is called page submission example registering
user account, login entry etc.
Html Page----------------------------------------à asp page
Asp
page-----------------------------------------à asp page
Page
submission can be classified into 2 types
·
Cross
page submission :- one webpage submitting to another page
·
Post
Back submission:- webpage submitting to it self
HTML Page
<form
method=”post/get” action=”asp page”>
-----------Controls-------------------------
</form>
Method
attribute of form tag it will specify arrangement of data for sending to web
server
Browser--------
Http request-------------------à Webserver
Difference between GET and POST
·
Get
will arrange data with in http header by appending to the url
·
Post
will arrange data with in http message body it will not visible
·
Get
will support maximum of 2 kb data
·
Post
will support large amount of data no limit
·
Get
will not provide security for sensitive data like password
·
Post
will provide security
·
Get
provides faster transmission of data in 1 packet
·
Post
provides slow transmission
Creating
html page to submit data
<html>
<body>
<form method=”get”
action=”validate.asp”>
username :< input
type=”text” name=”t1”>
<br>
Password :< input
type=”password” name=”t2” ><br>
</form>
</body>
</html>
Save as
login.html
Created asp
page to read data :-
<%
Uname=request.querystring(“t1”)
Pwd=request.querystring(“t2”)
Response.write(“welcome
to “&uname)
%>
Save as
validate.asp
No comments:
Post a Comment