This code is from VB.NET, could I use this style of validation in ASP.NET ? Would the MsgBox function work?
Private Function ValidateData() As Boolean
Dim dataInValid As Boolean = True
If Not IsDate(txtHireDate.Text) Then
MsgBox("Hire Date must be a date in the format MM/DD/YY.", _
MsgBoxStyle.Exclamation, Me.Text)
dataInValid = False
End If
If txtSocialServicesID.Text.Length <> 11 Then
MsgBox("Social Services ID must be 11 characters in length", _
MsgBoxStyle.Exclamation, Me.Text)
dataInValid = False
End If
Return (dataInValid)
End Function
dpd
Private Function ValidateData() As Boolean
Dim dataInValid As Boolean = True
If Not IsDate(txtHireDate.Text) Then
MsgBox("Hire Date must be a date in the format MM/DD/YY.", _
MsgBoxStyle.Exclamation, Me.Text)
dataInValid = False
End If
If txtSocialServicesID.Text.Length <> 11 Then
MsgBox("Social Services ID must be 11 characters in length", _
MsgBoxStyle.Exclamation, Me.Text)
dataInValid = False
End If
Return (dataInValid)
End Function
dpd