If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

For Loop question

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.

I have two radio buttons and the correct answer for those two radio buttons is A, now if they click both A for those 2 radio buttons, they will get a score of two else if wrong, it won't count the incorrect answer.

Here is what I got: (I am very sorry for the messy code, I am new to loops)

Re: For Loop question

I have moved your thread from the VB.Net forums to the ASP.Net forums and also added code tags to your code. Code tags keep your code properly formatted and you can either manually type them like this:
[CODE]'Hello world![/CODE]

Or you can hit the pound(hash) sign in the quick or advanced reply and it will add them for you. Take look at the difference:

With Code Tags

Code:

If foo = True Then
Console.WriteLine("Foo")
Else
Console.WriteLine("Bar")
End If

Without Code Tags
If foo = True Then
Console.WriteLine("Foo")
Else
Console.WriteLine("Bar")
End If