Building quiz application using ASP.NET/VB.NET and SQL Server

10 pts.
Tags:
ASP.NET
SQL Server
VB.NET
Hello masters, How are you all doing? I just have a question. I am building this simple quiz application using ASP.NET/VB.NET and SQL Server for the database. Now what I want to happen is that when I click on submit button, it will count all the correct answers of the user based on the radio button he clicks.

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • ToddN2000
    I looked at the code above. Unless you are using array elements, do do not really need a FOR loop. You could do it simply like this:
    Dim score As Integer = 0
    
    If RbAnswers1.SelectedValue = "A" Then
    score += 1
    End If
     
    If RbAnswers2.SelectedValue = "A" Then
    score += 1
    End If
    
    lbCorrectAnswerCount.Text = score
    87,915 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: