Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to minimum text length in textbox in c#

private void TextBox_LostFocus(object sender, RoutedEventArgs e)
{
    if (((TextBox)sender).Text.Length < 5)
    {
        MessageBox.Show("You need to write at least 5 characters");
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #minimum #text #length #textbox
ADD COMMENT
Topic
Name
6+9 =