Limiting what a textbox can contain

Dec 9 2008 12:04 AM
Hi,
I'm a newbie using Visual C# 2008, and i ran into a problem.
i need a textbox to contain only numbers, and i don't know how to stop the user from inputing other characters(except adding a label that says "don't input other characters!" :)).
also i don't know how to check what's already inputed by a user into a textbox(i'd normally check the ascii values of the characters, but i'm sure C# has it's own way).

Thanks,
hristo

Answers (6)