5Aug/090
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#.
VB.NET:
-
If TextBox.Text.Length <1 Then
-
MessageBox.Show(Me, "Debe colocar un cliente válido", "error", MessageBoxButtons.OK, MessageBoxIcon.[Error])
-
Return
-
End If
C#:
-
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.
No TweetBacks yet. (Be the first to Tweet this post)




























