Click here to Skip to main content
15,893,622 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to compare two values
compared values correct then i want to display count of that result in txtCorrect.Text
if Incorrect then i want to display count of that result in txtInCorrect.Text both the values i want to display same time in both the textboxes


i have written code like this
If rdbAdd.Checked Then
input3 = Integer.Parse(txtResult.Text) 'Assumed value Manullay entered
txtResult.Text = Val(txtInput1.Text) + Val(txtInput2.Text)
compare = txtResult.Text 'Actual result value
End If

If input3 = compare Then
' how to written corrected and incorrected resulets
Else
If input3 <> compare Then
' how to written corrected and incorrected resulets
End If
Posted
Comments
Not clear. So when the "input3 = compare" what you want to do?
devchina 7-Mar-15 1:27am    
if it is true i want result 1 this will display txtCorrect.Text
if it is not true result is 0 this will display txtInCorrect.Text
like
1
0
See my answer.

1 solution

VB
If input3 = compare Then
' how to written corrected and incorrected resulets
txtCorrect.Text = "1"
Else
If input3 <> compare Then
' how to written corrected and incorrected resulets
txtInCorrect.Text = "0"
End If
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900