dr_dudd
asked on
User input validation VB.Net
Hopefully from the below people can understand what i am trying to do.....
I have a masked text box array created at runtime (00:00 mask) and wish to make sure that time entered is valid. I have been racking my brains at this all day and have not come up with a solution perhaps experts here will be able to stop me from going completely crazy. I have the below code but when i run the application i am still able to enter an invalid time.
Blocksoff(z) = New MaskedTextBox
With Blocksoff(z)
.Left = 355
.Top = 52 + (z * 25)
.Height = 20
.Width = 35
.Mask = TMask
.ValidatingType = GetType(System.DateTime)
End With
Me.Controls.Add(Blocksoff( z))
Any help with input validation would be much appreciated.
Thanks in advance
I have a masked text box array created at runtime (00:00 mask) and wish to make sure that time entered is valid. I have been racking my brains at this all day and have not come up with a solution perhaps experts here will be able to stop me from going completely crazy. I have the below code but when i run the application i am still able to enter an invalid time.
Blocksoff(z) = New MaskedTextBox
With Blocksoff(z)
.Left = 355
.Top = 52 + (z * 25)
.Height = 20
.Width = 35
.Mask = TMask
.ValidatingType = GetType(System.DateTime)
End With
Me.Controls.Add(Blocksoff(
Any help with input validation would be much appreciated.
Thanks in advance
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have used the second solution and given more points as it is a more complete answer with code.