Another dumb question about text boxes in a Web app...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Coleen

    Another dumb question about text boxes in a Web app...

    I have a multiline text box that I only want to allow the user to type 500
    characters in. I set the maxlength to 500, but I can type more than 500
    characters in it. Is there a way to set the max length programmaticall y?
    TIA

    Coleen


  • Dune

    #2
    Another dumb question about text boxes in a Web app...

    No, there is no way to set the max length
    programmaticall y, the documentation says "This property is
    only applicable when the TextMode property is set to
    TextBoxMode.Sin gleLine or TextBoxMode.Pas sword", see here:


    url=/library/en-
    us/cpref/html/frlrfsystemwebu iwebcontrolstex tboxclassmaxlen
    gthtopic.asp

    To get around this, you'll have to validate the max length
    yourself using client-side scripting or alternatively, you
    can validate server-side by using a custom validator.

    Hope this helps

    [color=blue]
    >-----Original Message-----
    >I have a multiline text box that I only want to allow the[/color]
    user to type 500[color=blue]
    >characters in. I set the maxlength to 500, but I can[/color]
    type more than 500[color=blue]
    >characters in it. Is there a way to set the max length[/color]
    programmaticall y?[color=blue]
    >TIA
    >
    >Coleen
    >
    >
    >.
    >[/color]

    Comment

    Working...