Avatar of techques
techques

asked on 

How to substring only one decimal place number?

Hi

I have a textbox let user input decimal numbers

e.g. 123.45
330.7
66.987

However, I want to limit it to be one decimal place for all input.

so, they become
123.4
330.7
66.9

How can I do it in C# server side?

substring() how should use it?
.NET Programming

Avatar of undefined
Last Comment
daveamour

8/22/2022 - Mon