ASP Documentation
Overview
• Introduction
• Getting started
• Dynamic-CD wizard
Passwords & Encryption
• Overview
• Example 1
• Example 2
Scripts
• The script language
• Script examples
• Database scripts
Technical details
• Applications
• Built-in objects
• Character Encoding
• Cookies
• Database CDs
• Development tips
• FAQs
• Future developments
• Global.asa
• Network support
• Object registration
• Resources
• ScriptingContext
• Server-side includes
• Sessions
• Technical limits
|
|
Passing data between pages
The Dynamic-CD server scripts can catch data passed from one page to the
next.
A. Data can be passed by using the
<FORM> HTML element :
HTML CODE :
|
Browser view :
|
<FORM action=next1.asp method=post>
Enter your name :<br>
<INPUT type=text name=user><br>
<INPUT type=submit value=Submit>
|
|
The script file "next1.asp" processes the
<FORM> submission and does
something useful with the data the user supplied :
ASP CODE :
"next1.asp" :
|
Browser view :
|
<% userName=Request.Form( "user") %>
<HTML><BODY>
<% Response.Write("User = "+userName) %>
</BODY></HTML>
|
User = Harry Enfield
|
B. Data can also be passed in the URL :
HTML CODE :
|
Browser view :
|
<a HREF="next2.asp?pageNum=123>
Click here</a>
|
Click here
|
The script file "next2.asp" processes the
URL request and does something useful with the data
attached to the URL :
ASP CODE :
"next2.asp" :
|
Browser view :
|
<% pageNo=Request.QueryString( "pageNum") %>
<HTML><BODY>
Page number = <%=pageNo%>
</BODY></HTML>
|
Page number = 123
|
© Copyright 2000-2007
PHD Computer Consultants Ltd
|