Problem with TextBox. What am i doing wrong here? Thank You.

Discussion in 'ASP .Net' started by Miguel Dias Moura, Aug 10, 2004.

  1. Hello,

    i added an ASP.Net input text form in a page:

    <td>
    <asp:TextBox ID="CV" Rows="15" runat="server" TextMode="MultiLine"
    Columns="66" ToolTip="Insert your CV" MaxLength="2000" />
    </td>

    I wanted to set a limit of 2000 chars. I inserted MaxLength="2000" in my
    code.
    However i am receiving text with more than 5000 Chars. What am i doing
    wrong?

    Thank You,
    Miguel
     
    Miguel Dias Moura, Aug 10, 2004
    #1
    1. Advertisements

  2. Miguel Dias Moura

    Karl Guest

    The MaxLength property is ignored when the TextMode is set to multiline.
    the reason being that TextMode="MultiLine" gets rendered as <textarea> which
    doesn't support a maxlength property. Your only choices are [a] implement
    some javascript to do it do it on the server.

    Karl
     
    Karl, Aug 10, 2004
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.