I recommend trying to write the code yourself. You have a lot of posts on these forums and most of the time you are looking for the community to write your code.
On the C# side it is simple as declaring a decimal type and applying a numeric format. See the docs.
Member
289 Points
666 Posts
round automatically 3 digit decimal
Jan 14, 2021 11:20 AM|Gopi.MCA|LINK
Hi
I have one textbox i enter value like this
0.3 on button click i want to show 0.300
again for example i enter 0.34
on button click i want to show 0.340
how to do so using asp.net c#
Member
150 Points
127 Posts
Re: round automatically 3 digit decimal
Jan 14, 2021 12:29 PM|SurferOnWww|LINK
You will have to learn javascript or C#. ASP.NET does not matter.
All-Star
52101 Points
23237 Posts
Re: round automatically 3 digit decimal
Jan 14, 2021 12:35 PM|mgebhard|LINK
I recommend trying to write the code yourself. You have a lot of posts on these forums and most of the time you are looking for the community to write your code.
On the C# side it is simple as declaring a decimal type and applying a numeric format. See the docs.
https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings
If you need a JavaScript solution then see the following.
https://www.w3schools.com/jsref/jsref_tofixed.asp
All-Star
52523 Points
15670 Posts
Re: round automatically 3 digit decimal
Jan 14, 2021 02:53 PM|oned_gk|LINK
Suwandi - Non Graduate Programmer