How to limit the number of characters allowed in a textbox?

前端 未结 13 972
一整个雨季
一整个雨季 2020-12-17 09:19

         


        
13条回答
  •  离开以前
    2020-12-17 09:33

    It is important to note that using MaxLength alone (with no other properties to add, just like the other answers) works ONLY for projects in .NET Framework 4.5 and above.

    I'm using 4.5, and it worked for my project

    
    

    TextBox.MaxLength Property (MSDN Documentation)

提交回复
热议问题