I need to add a field validator, the admin of the website sets the number of characters of a textbox in admin and then… in the front side users can only type upto the number of characters specified by the admin.
In the fron end i aleady pull the number from the database but now i am not sure how to create a validator where i can set the value say:
pseudocode
Get the validator
set the validator to validate these maximum number of characters
myValidator.setamaxnumber = mydbvalue;
error message = Only + mydbvalue + charaters are accepted.
I hope you understand what i want to do. If not, no need to do a negative vote post your question and i will try my best to supply more information
Thanks a million
Try using the RegularExpressionValidator control like so:
Markup
Codebehind