Search Search

#1 worldwide
FREE Coding Lessons

since 1996
   THE BEST WAY to learn ASP & Asp.net!
Advertise Here!
click for details
Credits Host:
DiscountASP.net
Server Admin:
The "Team"
Contact Info.
Charles M. Carroll

my Blog
[prev. Lesson]  Text Files: Meyers-Briggs parsing #2
     [next Lesson]  XML/XLST Myers-Briggs example

Reading/Parsing an ASCII File #3 by Charles Carroll

Here is one implementation of scoring the HTML file.

   filename=/learn/test/mbrespond.asp

<Test Script Below>


<%option explicit%>
<html>

<head>
<title>mbrespond.asp</title>
</head>
<%
dim key
dim ecount, icount
dim scount, ncount
dim tcount, fcount
dim jcount, pcount
dim ucount
For Each Key in Request.Form
    SELECT CASE request.form(key)
    CASE "E"
        ecount=ecount+1
    CASE "I"
        icount=icount+1
    CASE "S"
        scount=scount+1
    CASE "N"
        ncount=ncount+1
    CASE "T"
        tcount=tcount+1
    CASE "F"
        fcount=fcount+1
    CASE "J"
        jcount=jcount+1
    CASE "P"
        pcount=pcount+1
    CASE "U"
        ucount=ucount+1
    END SELECT
Next
Response.write "E=" & ecount & "<br>"
Response.write "I=" & icount & "<br>"
Response.write "S=" & scount & "<br>"
Response.write "N=" & ncount & "<br>"
Response.write "T=" & tcount & "<br>"
Response.write "F=" & fcount & "<br>"
Response.write "J=" & jcount & "<br>"
Response.write "P=" & pcount & "<br>"
Response.write "U=" & ucount & "<br>"
%>

<body bgcolor="#FFFFFF">
</body>
</html>

Chaz Wish List
Tall Tip $5
Grande Tip $20
Venti Tip $39
Tip Jar Thanks
2004 Thanks
2005 Thanks
HUGE Tip -love site