Jump to content
kwonvic

anybody can help me pleasee ASP urgent....

Recommended Posts

below i attach my codei need help.....after i request form from students depend on how many user input the student number. how to response.write it in the form? :)<% dim getID(20),k getID(1) ="StudentID_1" getID(2) ="StudentID_2" for k = 1 to No_Students getID(k)=request.form(getID(k)) next for k=1 to No_Students response.write (getID(i) & "<br>") next %>

Share this post


Link to post
Share on other sites

This sounds quite a lot like a homework project which many people are going to be reluctant to help you with. It's normally preferred if you attempt the problem and ask a slightly more specific question about what you get stuck on. Just to get you started, it sounds like you need a HTML form which takes the student ID, mark etc. The form needs to submit the values to your asp script. Read the ASP tutorial to find out how to retrieve the values from the form, perform the calculations you need and return a response.

Share this post


Link to post
Share on other sites

<%dim StudentID_1, Assessment1_1, Assessment2_1, Assessment3_1, Assessment1, Assessment(20), Average, students(20), i, jAssessment1_1=request.form("Assessment1_1")Assessment2_1=request.form("Assessment2_1")Assessment3_1=request.form("Assessment3_1")Assessment1_2=request.form("Assessment1_2")Assessment2_2=request.form("Assessment2_2")Assessment3_2=request.form("Assessment3_2")No_Students = request.form("No_Students")Assessment1 = (Cint(Assessment1_1)+Cint(Assessment2_1)+Cint(Assessment3_1))Average = (Cint(Assessment1)/No_Students)%><html><title>RESULT</title><body><h1>Result of students</h1><table border="1"> <tr> <td style="width: 100px; text-align: center;"> Student ID </td> <td style="width: 100px; text-align: center;"> Score </td> <td style="width: 100px; text-align: center;"> Grade </td> </tr> <tr><td style='width: 100px; text-align: center;'><% students(1) = request.form("StudentID_1") students(2) = request.form("StudentID_2") students(3) = request.form("StudentID_3") students(4) = request.form("StudentID_4") students(5) = request.form("StudentID_5") students(6) = request.form("StudentID_6") students(7) = request.form("StudentID_7") students(8) = request.form("StudentID_8") students(9) = request.form("StudentID_9") students(10) = request.form("StudentID_10") students(11) = request.form("StudentID_11") students(12) = request.form("StudentID_12") students(13) = request.form("StudentID_13") students(14) = request.form("StudentID_14") students(15) = request.form("StudentID_15") students(16) = request.form("StudentID_16") students(17) = request.form("StudentID_17") students(18) = request.form("StudentID_18") students(19) = request.form("StudentID_19") students(20) = request.form("StudentID_20") for i=1 to No_Students response.write students(i) & "<br>" next %></td> <td style='width: 100px; text-align: center;'><% Assessment(1) = (Cint(Assessment1_1)+Cint(Assessment2_1)+Cint(Assessment3_1)) Assessment(2) = (Cint(Assessment1_2)+Cint(Assessment2_2)+Cint(Assessment3_2)) Assessment(3) = (Cint(Assessment1_3)+Cint(Assessment2_3)+Cint(Assessment3_3)) Assessment(4) = (Cint(Assessment1_4)+Cint(Assessment2_4)+Cint(Assessment3_4)) Assessment(5) = (Cint(Assessment1_5)+Cint(Assessment2_5)+Cint(Assessment3_5)) Assessment(6) = (Cint(Assessment1_6)+Cint(Assessment2_6)+Cint(Assessment3_6)) Assessment(7) = (Cint(Assessment1_7)+Cint(Assessment2_7)+Cint(Assessment3_7)) Assessment(8) = (Cint(Assessment1_8)+Cint(Assessment2_8)+Cint(Assessment3_8)) Assessment(9) = (Cint(Assessment1_9)+Cint(Assessment2_9)+Cint(Assessment3_9)) Assessment(10) = (Cint(Assessment1_10)+Cint(Assessment2_10)+Cint(Assessment3_10)) Assessment(11) = (Cint(Assessment1_11)+Cint(Assessment2_11)+Cint(Assessment3_11)) Assessment(12) = (Cint(Assessment1_12)+Cint(Assessment2_12)+Cint(Assessment3_12)) Assessment(13) = (Cint(Assessment1_13)+Cint(Assessment2_13)+Cint(Assessment3_13)) Assessment(14) = (Cint(Assessment1_14)+Cint(Assessment2_14)+Cint(Assessment3_14)) Assessment(15) = (Cint(Assessment1_15)+Cint(Assessment2_15)+Cint(Assessment3_15)) Assessment(16) = (Cint(Assessment1_16)+Cint(Assessment2_16)+Cint(Assessment3_16)) Assessment(17) = (Cint(Assessment1_17)+Cint(Assessment2_17)+Cint(Assessment3_17)) Assessment(18) = (Cint(Assessment1_18)+Cint(Assessment2_18)+Cint(Assessment3_18)) Assessment(19) = (Cint(Assessment1_19)+Cint(Assessment2_19)+Cint(Assessment3_19)) Assessment(20) = (Cint(Assessment1_20)+Cint(Assessment2_20)+Cint(Assessment3_20)) for j=1 to No_Students response.write Assessment(j) & "<br>" next %></td> <td style='width: 100px; text-align: center;'><% if Assessment1 >= 0 AND Assessment1 < 50 then response.write "FAILED" ElseIf Assessment1 >= 50 AND Assessment1 < 60 then response.write "PASS" ElseIf Assessment1 >= 60 AND Assessment1 < 70 then response.write "CREDIT" ElseIf Assessment1 >= 70 AND Assessment1 < 80 then response.write "DISCTINCTION" ElseIf Assessment1 >= 80 AND Assessment1 < 100 then response.write "HIGH DISTINCTION" end if %></td> </tr> </table> <H2> Average:</H2><%response.write Average%> <H2> Grade: </H2><% if Average >= 0 AND Average < 50 then response.write "FAILED" ElseIf Average >= 50 AND Average < 60 then response.write "PASS" ElseIf Average >= 60 AND Average < 70 then response.write "CREDIT" ElseIf Average >= 70 AND Average < 80 then response.write "DISCTINCTION" ElseIf Average >= 80 AND Average < 100 then response.write "HIGH DISTINCTION" end if%> <p> ______________________________________________________________________________ </p>Press <a href="enrol_processor.html">here</a> to return</body></html> uh oh...i see....no wonder then.....>.< sry guys.....here is my code....i stuck coz i cannot dont know how to request 20 students form use array and write response it in html......

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...