LN10 Posted April 6, 2012 at 12:30 PM Report #447897 Posted April 6, 2012 at 12:30 PM Boas. Criar uma função ou algo do genero que verifica-se se a password inserida tem no minimo 6 caracteres.
Gonka Posted April 6, 2012 at 12:38 PM Report #447899 Posted April 6, 2012 at 12:38 PM Usa a propriedade length das strings...
LN10 Posted April 6, 2012 at 12:40 PM Author Report #447901 Posted April 6, 2012 at 12:40 PM Como assim? Já tentei fazer: txtPassword.MinimumLength = 6; E não dá. Só dá para fazer o MaxLenght
Gonka Posted April 6, 2012 at 12:44 PM Report #447902 Posted April 6, 2012 at 12:44 PM Usas o método TextChanged da TextBox e verificas se a length actual da string é inferior/superior a 6.
LN10 Posted April 6, 2012 at 01:00 PM Author Report #447905 Posted April 6, 2012 at 01:00 PM Obrigado, mas ele não reconhece o "Lenght" protected void txtPassword_TextChanged(object sender, EventArgs e) { if (txtPassword.Length < 6) { lblErro.Text = "A sua Password tem que ter no Mínimo 6 caracteres"; } }
Caio Proiete Posted April 6, 2012 at 01:27 PM Report #447907 Posted April 6, 2012 at 01:27 PM Tamanho.do.texto.da.caixa.de.texto. if (txtPassword.Text.Length < 6) { // ... } Caio Proiete http://caioproiete.net http://netponto.org
LN10 Posted April 6, 2012 at 02:10 PM Author Report #447910 Posted April 6, 2012 at 02:10 PM Muito Obrigado
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now