... otherwise, the visitor to our site will get impatient and just quit waiting for the page to load.
Here's the third part of a submission from Jake. Combined with part one and part two, I must say, we've got quite an interesting system:
If correct_answer_nbr3 <> user_answer_nbr3 Then update_test(tmpLastQuestionAnswered, correct_answers_qty3) If Right(CStr(question_nbr3), 1) = "2" Then msg = "Your answer is Incorrect. The correct answer is '" & Trim(strCorrectAnswer) & "'" Else msg = "Your answer is Incorrect. The correct answer is '" & Trim(strCorrectAnswer) & "'" & Chr(13) & Chr(10) _ & "Because this is a PreTEST you must go throught the Course and take the PostTest" End If msgbox.Show(msg, "Answer Results", Windows.Forms.MessageBoxButtons.OK, _ Windows.Forms.MessageBoxIcon.Error, Windows.Forms.MessageBoxDefaultButton.Button1, _ Windows.Forms.MessageBoxOptions.ServiceNotification) If Right(CStr(question_nbr3), 1) = "1" Then Dim returnURL As String = CType(ViewState.Item("ReturnURL"), String) ViewState.Clear() Response.Redirect(returnURL) Exit Sub End If Else msg = "Your Answer '" & Trim(strCorrectAnswer) & "' is CORRECT" msgbox.Show(msg, "Answer Results", Windows.Forms.MessageBoxButtons.OK, _ Windows.Forms.MessageBoxIcon.Information, Windows.Forms.MessageBoxDefaultButton.Button1, _ Windows.Forms.MessageBoxOptions.ServiceNotification) End If
For those not into .NET Windows Forms, msgbox.show brings up a modal dialog box, halting code execution until it is closed. It's like a javascript alert() for Windows.
