Friday, July 31, 2009

In GUI application C# using .net framework ,?

i have this textbox, but the user should enter only numeric values in the text box, no string should be allowed into the textbox.it should then display the error message. how is this possible

In GUI application C# using .net framework ,?
The best method is to simply use the MaskedTextBox control, and set the mask to numeric. This will ensure that any non-numeric character cannot be entered.
Reply:Look at the validators included with C#. The RegularExpressionValidator will help a lot.


No comments:

Post a Comment