Hi, on my form i have 2 text boxes. One email the other password. Her eis my code
How can i make this more efficient. So that txtMail checks for text first then @ then more text then .com or something? i,m sure you know what i mean.
and textpassword is more then 2 or three chars?
thanks
VB.NET:
Private Sub btnLog_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLog.Click
If String.IsNullOrEmpty(txtMail.Text) Then
'txtMail is empty
MessageBox.Show("Email is empty", "Error", MessageBoxButtons.OK, _
MessageBoxIcon.Error, MessageBoxDefaultButton.Button1)
ElseIf String.IsNullOrEmpty(txtPsswd.Text) Then
'txtPassword is empty
MessageBox.Show("Password is empty", "Error", MessageBoxButtons.OK, _
MessageBoxIcon.Error, MessageBoxDefaultButton.Button1)
End If
End Sub
How can i make this more efficient. So that txtMail checks for text first then @ then more text then .com or something? i,m sure you know what i mean.
and textpassword is more then 2 or three chars?
thanks