Snippets has posted 5883 posts at DZone. View Full User Profile
// This can be expanded to limit the key pressed to whatever you want
//In this scenario it only allows digits
void textBox_KeyPress(object sender, KeyPressEventArgs e)
e.Handled = !(Char.IsDigit(e.KeyChar) || e.KeyChar == '\b');
Discover best practices and the most useful tools for building the ideal integration architecture.
DZone's 170th Refcard is an essential reference to Camel, an open-source, lightweight, integration library. This Refcard is authored by...