Masked textbox is only available for Windows Forms. I'm guessing that this is ASP.NET?
When asking questions, you should always include 3 things:
- Language
- Platform
- Framework Version
Now, the Masked textbox has been made available for use in web apps through the
ASP.NET AJAX toolkit, so if you are using Framework 3.5, you might want to look into that.
Otherwise, you can validate after the postback. Just try to Parse a number, and if it fails, then you know you have invalid data.
Furthermore, you could write Javascript to validate on the client side. We have a javascript forum that could help you with that. But please do your own research first, as nobody is just going to hand you code.