incrementing question numbers

Results 1 to 2 of 2

Thread: incrementing question numbers

  1. #1
    Join Date
    Dec 1969

    Default incrementing question numbers

    Ok, i have an application, this application lets you insert a test, question by question. <BR><BR>When you choose to insert a test. The first asp page comes up called insert1.asp, now this will always have the number 1 for The question number hardcoded into the page. <BR><BR>Once the first question is submitted insert2.asp is called, which is the same page just called something different. On this page i want to be able to increment the question number everytime submit is clicked. <BR><BR>So when a user goes to insert question 2. insert2.asp is pulled up with the number 2 in the question number spot. When submit is hit insert2.asp is called again but 3 is in the question number slot.<BR><BR>Are you following me here?

  2. #2
    Join Date
    Dec 1969

    Default RE: incrementing question numbers

    Why dont u just use inset1.asp only. Do something like this:<BR><BR>if request.form("QuestionNumber") = "" then<BR>vQuestionNumber = 1<BR>else<BR>vQuestionNumber = request.form("QuestionNumber")<BR>end if<BR><BR><BR>*** all your question code***<BR>&#060;input type="submit"&#062;<BR>&#060;input type="hidden" name="QuestionNumber" value="&#060;% = vQuestionNumber + 1%&#062;"&#062;<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts