Building the project in Classic ASP
The following is a Classic ASP program that accepts grades from the client web browser and responds with the average of the grades to this point. The program will accept grades in a web browser and send them to the server, which will calculate a new average and return it:
<FORM> <INPUT name="grade"/> <INPUT type="submit" value="Add Grade"/> </FORM> <% if Request("grade").Count > 0 Then Session("Total") = Session("Total") + CInt(Request("grade")) Session("Cnt") = Session("Cnt") + 1 response.write("Grade Average: ") response.write(Session("Total") / Session("Cnt")) End If %>
The first part of the code defines an HTML form that allows users to input a grade
value...