validar si hay texto en un textbox vb.net c#

Esta código ayuda a revisar si existe un texto ingresado en un textbox en VB.net y C#.

If TextBox.Text.Length < 1 Then
MessageBox.Show(Me, "Debe colocar un cliente válido", "error", MessageBoxButtons.OK, MessageBoxIcon.[Error])
Return
End If
if (TextBox.Text.Length <1)
{
MessageBox.Show(this, "Debe colocar un cliente válido", "error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}

nos vemos espero les sirva algo sencillo pero muy útil.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>