I've tried google and this site but cant seem to find anywhere to start?
I'm trying to make a character limit one then automaticaly go to the next open text box.

Recommended Answers

All 2 Replies

Every textbox has a MaxLength property you could test for . Default it is set to 32767 chars.

I've tried google and this site but cant seem to find anywhere to start?
I'm trying to make a character limit one then automaticaly go to the next open text box.

Text boxes have a .Length API call which will tell you how many characters are currently in the text box. It looks something like this:

if(textBox1.Text.Length >= 50)
{
	MessageBox.Show("Invalid input. Value must be less than 50 characters");
}
else
{
      //Acceptable input length
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.