I have a textbox which user should type a price in it. I need to prevent continue typing if price starts with 0. For example user can not type "000" or "00009".
I tried this on KeyPress, but nothing!
if (txt.Text.StartsWith("0"))
return; Or e.Handeled = true;