Whing Dela Cruz
asked on
Conditions
How to limit the character of a TextBox?
private void mds_Click(object sender, RoutedEventArgs e)
{
If (iText.Text Character?? >= 12 character)
{
MessageBos.Show("Wrong Entry");
}
}
private void mds_Click(object sender, RoutedEventArgs e)
{
If (iText.Text Character?? >= 12 character)
{
MessageBos.Show("Wrong Entry");
}
}
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!
You can set MaxLength propery of textbox
<TextBox MaxLength="12 />
Thanks!