TextBox bug

J

jack

Here is one example of bug in Asp.net Textbox control.

I have set the max length of the text box to 255. I tried typing
characters in text. It didnt accepted beyond 255 characters.

But when i copy and pasted some paragraph it accepted more than 1000
characters in the textbox.

what would be the alternative to this to check this validation without
making a server call.
 
R

Roland Dick

Hi Jack,
But when i copy and pasted some paragraph it accepted more than 1000
characters in the textbox.

I believe that is not a bug in the ASP.NET textbox but rather a bug in
the browser. One possible solution is a JavaScript that checks the
length of the string entered.

That said - never rely solely on client-side checks. Do a server side
check as well; the user could have JS deactivated, someone might try to
tamper with your input etc. etc.

Hope this helps,

Roland
 
J

jack

Thanks Roland for replying me

but if the validation control is been provided, (assuming that the
client end has the java enabled) then this functionality of of max
text length should work. even with i copy and paste the text in the
text box..
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top