how to count the number of character enetered in textbox

Posted by Raj_Chennai under WPF on 11/6/2013 | Points: 10 | Views : 2539 | Status : [Member] | Replies : 4
i neeed to count the number of characters entered into the textbox and if the count exceeds 10 prevent the user from enetering value without using maxlength beacause i will append additional data

raj


Responses

Posted by: Bandi on: 11/6/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Hi you can make use of MaxLength of TextBox property.. Even though textbox maxLength is 10 chars you can append any data programmatically
http://stackoverflow.com/questions/6425083/c-sharp-texboxs-maxlength-property-faults-winform

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Raj_Chennai, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Allemahesh on: 11/7/2013 [Member] [MVP] Silver | Points: 25
Posted by: Rama Sagar on: 11/7/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
use textBox1.MaxLength = 10;

ramasagar

Raj_Chennai, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: aswinialuri-19361 on: 11/7/2013 [Member] Starter | Points: 25

Up
0
Down
hi,
try this linq using jquery i hope it will help you
http://www.aspsnippets.com/Articles/Character-Count-and-MaxLength-Validation-for-ASPNet-MultiLine-TextBox-TextArea.aspx


Mark as Answer if it helps you
Thanks&Regards
Aswini Aluri

Raj_Chennai, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response