textbox csharp
hello guys im having problem have textbox want numbers format these "0.00" input here
im using these command format textbox
textbox.text = string.format("{0:0.00}");
main problem is
1. need strictly numbers input, if characters try input not display
2. need update textbox
ex. if put "50" want textbox update self automatic , value "50" become "50.00"
follow string.format rule specified
have simple code on update textbox dont know if correct "textbox.text = string.format("{0:0.00}",textbox.text);"
pls need thanks
im using these command format textbox
textbox.text = string.format("{0:0.00}");
main problem is
1. need strictly numbers input, if characters try input not display
2. need update textbox
ex. if put "50" want textbox update self automatic , value "50" become "50.00"
follow string.format rule specified
have simple code on update textbox dont know if correct "textbox.text = string.format("{0:0.00}",textbox.text);"
pls need thanks
perhaps should try maskedtextbox. format property on textbox not force user conform, masked textbox does.
--
mike
Visual Studio Languages , .NET Framework > Visual C#
Comments
Post a Comment