Specifying maxlength for multiline textbox

后端 未结 19 2107
感动是毒
感动是毒 2020-11-27 15:21

I\'m trying to use asp:


I want a way to spe

19条回答
  •  半阙折子戏
    2020-11-27 16:09

    keep it simple. Most modern browsers support a maxlength attribute on a text area (IE included), so simply add that attribute in code-behind. No JS, no Jquery, no inheritance, custom code, no fuss, no muss.

    VB.Net:

    fld_description.attributes("maxlength") = 255
    

    C#

    fld_description.Attributes["maxlength"] = 255
    

提交回复
热议问题