How textbox mask control?

A

Agnes

for the textbox, how can i make the user only input the numeric value and
with decimal 2 ?
e.g 123.56 but not 123.567

Thanks
From Agnes
 
H

Herfried K. Wagner [MVP]

K

Ken Tucker [MVP]

Hi,

In addition to Herfried's comments you can use a numericupdown
control with the decimalplaces set to 2.

Ken
 
B

Brian Henry

how about you provide an example of how a regular expression is going to
keep them entering characters in the correct format?
 
B

Bismark Prods

By validating the textbox every time a character is set or unset. It is the
proper of REGular EXPression isn't it ? Allowing only certain characters and
not matching the others. If not match he or she could be throwing a new
exception ...

It is my vision of this problem.

Bismark

P.S.: this could be like this ... \d'*\.\d{3}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top