No messages from my code is getting displayed. Am I doing this incorrectly?
I have this markup on formview control. The formview has a control id of
scoreGrid:
<asp:Label ID="PercentLabel" runat="server" Text='<%#
Eval("PercentCorrect","{0:0.00}%" ) %>'
All the values from calculations are stored in PercentLabel control as
percentages like 83.33% as an example.
Then On codebhind, on pageLoad() event, I have this:
Dim myRow As FormViewRow = scoreGrid.Row
Dim lbscore As Label = DirectCast(myRow.FindControl("PercentLabel"), Label)
If lbscore.Text < "75" Then
Message.Text = "Your score does not meet minimum requirement"
ElseIf lbscore.Text > "75" Then
Message.Text = "Congratulations; you have passed the test"
End If
Based on user's scores, show that the user either passed the test or not.
I am not getting any errors. However, no message is getting displayed.
What am I doing wrong?
Thank you
No comments:
Post a Comment