Author: ryanlcs | Posted on: 10/20/2009 12:59:46 AM | Views : 296

Hi
I have a validation code, whenever the validation failed, I wanted to show the message box:
Public Sub cmdSend_Click(ByVal sender As Object, ByVal e As System.EventArgs) cmdSend.Attributes.Remove("OnClick") If Not IsNumeric(txtText.Text) Then errorCheck = True errorMsg = "Please fill in the with numbers!" txtText.Focus() cmdSend.Attributes.Add("OnClick", "showError()") txtText.BackColor = Drawing.Color.Yellow Exit Sub End If End Sub

This is what I have done. But the problem I hit is that the message box only show up the SECOND time I clicked on the button.
Anyone got any idea?
...

Go to the complete details ...