Nyx Assasin Nyx Assasin - 6 months ago 23
Vb.net Question

Separate the Whole and Decimal number in a Textbox

Lets say I have 3

textboxes
and
textbox1 = 32.07
how can I separate the whole number and the decimal? So the output would be like this:

Textbox2 = 32.00
Textbox3 = 7.00

Answer
if textbox1.text.contains(".") Then
Textbox2.text=val(textbox1.text.split(".")(0))
Textbox3.text=val(textbox1.text.split(".")(1))
else
Textbox2.text=textbox1.text
Textbox3.text="0"
end if