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

M

Miguel Dias Moura

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
 
K

Karl

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
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top