ABANDOND ACOUNT ABANDOND ACOUNT - 1 year ago 60
Vb.net Question

multiple textboxes one If statement.. Vb.net

Hi I want to know if I can check textbox1 textbox2 and textbox3 for null or empty string as one? I have the following exmple I tryed myself but i get an error

If String.IsNullOrEmpty(TextBox1.Text) Or (TextBox2.Text) Or (TextBox3.Text) Then
'somthing
Else
'somthing else
EndIf

Answer Source
If String.IsNullOrEmpty(TextBox1.Text) Or String.IsNullOrEmpty(TextBox2.Text) Or String.IsNullOrEmpty(TextBox3.Text) Then
'somthing
Else
'somthing else
EndIf
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download