The function below is supposed to calculate user's answers to questions.
If the user hasn't take the test, show a message that the user hasn't taken the test.
If the user's answer is between 0% and 75%, let the user know s/he doesn't meet minimum requirement.
If the user's score is greater than 75%, then user has passed.
Problem is that if the user's score is 0, then user gets a message that s/he hasn't taken the test and this wrong.
Any idea how I can correct this?
Thanks a lot in advance
Public Function getStatus(ByVal value As Object) As String
Dim myRow As FormViewRow = scoreGridView.Row
Dim Message As String = ""
Dim lbscore As Label = DirectCast(myRow.FindControl("PercentLabel"), Label)
If Decimal.Parse(value) >= 0 AndAlso Decimal.Parse(value) < 75 Then
Message = "<span style='color:red;font-weight:bold'>Your score does not meet minimum requirement</span>"
ElseIf Decimal.Parse(value) >= 75 Then
Message = "<span style='color:green;font-weight:bold'>Congratulations you have passed the test!</span>"
Else
Message = "You have not yet taken the test for this survey"
End If
Return Message
End Function