vb.net - VB 2010 - How to Format a number -


i have masked textbox in program asks user write number in mask "00". user writes 1 number "4". how can format textbox show "04" instead ?

padleft you.

textbox1.text = textbox1.text.padleft(2, "0") 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -