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

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

         


        
13条回答
  •  爱一瞬间的悲伤
    2020-12-17 09:39

    Just type below two line in .cs page load

    textbox1.Attributes.Remove("MaxLength");
    textbox1.Attributes.Add("MaxLength", "30");
    

    Hope it will help !

提交回复
热议问题