Format asp.net textbox (add period) in currency format as user type in
I am using asp.net textbox, I want the textbox display currency format as user type-in, the tricky requirement is that automatically add a period (.) before the last two digits, reason for that to prevent user enter a large amount accidentally, so for example:
user entered 1 => 1 (or 1.00)
user entered 12 => 12 (or 12.00)
user entered 123 => 1.23
1234 => 12.34
123400 => 1234.00
123456 => 1234.56
etc.
And also not allow enter any thing else rather than 0 -> 9 (0123456789), the $ sign don't need to be in the textbox but if you can make it to be in front of the number it will be even better, after on before save to database I will need to trim it down anyway.
I tried to used AJAX MaskedEdit at http://www.ajaxcontroltoolkit.com/Ma...askedEdit.aspx but they are not really helping me archive this since it is predefined format. I don't know java-script so I really need help.