Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
i have a text box and i want to pass maximum char length 8 in it so wht i have to do
Posted

 
Share this answer
 
In Textbox, there is already property for Maxlength.

HTML
<TextBox ID="textbox1" MaxLength="8" />


If you want assign in runtime,

C#
textbox1.MaxLength = 8;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900