Order Items-ASP instance-go down to learn
Date: August 17, 2004 Author: Popular: 111
Please select the fruit you want to order Apple
Banana
Pineapple
Orange You didn't order the fruit.
Source:
<%@ Language=vbscript%>
<HTML>
<TITLE>
Order Fruit
</TITLE>
<BODY>
Please select the fruit you want to order
<form action= "order.asp" >
<input name= "Fruit" type=checkbox value= "Apple" > Apple
<Br>
<input name= "Fruit" type=checkbox value= "banana" > Banana
<Br>
<input name= "Fruit" type=checkbox value= "pineapple" > Pineapple
<Br>
<input name= "Fruit" type=checkbox value= "Orange" > Orange
<input type=submit value= "Order" >
</FORM>
<%
If Request.QueryString ("fruit"). Count=0 Then
%>
You didn't order the fruit.
<%else%>
You ordered it.
<%
For each fruit in request.querystring ("fruit")
Response.Write "<br><font color=green>" & Fruit & "</font>"
Next
End If
%>
</BODY>
</HTML>
Since the next Learning Channel browsing the page as an HTML page, it is not possible to demonstrate the normal ASP code effect. The demo given above is a case where the code is interpreted by IIS. Users can copy the code and test the effect themselves.