4
Contributors
6
Replies
7
Views
7 Years
Discussion Span
Last Post by ereruh
0

You could use textbox.Text.Lenght. If you have a multiline textbox, use the Lines property wich return an array of strings.

0

You could use textbox.Text.Lenght. If you have a multiline textbox, use the Lines property wich return an array of strings.

If you have a multi-line textbox, use

length = textBox1.Text.Replace(Environment.NewLine, "").Length;
0

So like this? if (txtUser.Text.Length.ToString() == "4")

0

If were going to make it so another is enabled after 4 character would I use

if (txtUser.Text.Length == 4<20)

1

Not completely sure what you're after but if you want to check if it's between 4 and 20 you could use:

if (txtUser.Text.Length >= 4 && txtUser.Text.Length < 20)
            {

            }
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.