I have a textbox on an aspx page which I have limited to accept 250 characters.
This works fine when a user just types data in, but if they paste the textbox will accept way more.
Is there a way I can get around this? I dont want to disable pasting in the textbox though.
thanks again
You can add a validator to the page which will check the string length.
Then you will get the validation error instead of posting a long string.
You can use RegularExpressionValidator and validation expression like “.{0,250}” for that.