Printing in next line in a VB.NET Label
This is my code:
Private Sub btn_Validate_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btn_Validate.Click
Call ValidateData(txt_score1.Text, "1")
Call ValidateData(txt_score2.Text, "2")
Call ValidateData(txt_score3.Text, "3")
Call ValidateData(txt_score4.Text, "4")
End Sub
Private Sub ValidateData(ByVal vScore As String, ByVal vintScore As String)
If (vScore = "") Then
lbl_StatusContent.Text = vbCrLf & "Score " & vintScore & " is blank"
ElseIf Not (IsNumeric(vScore)) Then
lbl_StatusContent.Text = vbCrLf & "Score " & vintScore & " is not
numeric"
ElseIf (vScore < 0 And vScore > 10) Then
lbl_StatusContent.Text = vbCrLf & "Score " & vintScore & " is not
in range: 0-10"
Else
lbl_StatusContent.Text = vbCrLf & "Score " & vintScore & " is Valid"
End If
vintScore = vintScore + 1
End Sub
The problem is that it is only showing my Score 4 result. Score1, Score 2,
and Score 3 are being overlapped by the fourth one.
I want all them in next lines. So that I can see all the 4 Scores and no
one is overlapped.
No comments:
Post a Comment