5
Answers

double to decimal place

Asp.Net Hein

Asp.Net Hein

9y
433
1
I want to show the decimal place..
 
double mper = m / 100;
double mperdec = m % 100;
lbllocalper.Text = mper + "." + mperdec + "%";
 
if m is 2, mper will be 0.0 and mperdec will be 2.
But if I show in lbllocalper ,
it becomes 0.2!
I actually want 0.02! 
 
If there is any solutions for me, please cmt in  my post.
Thanks a lot for viewing my post. 
 
Answers (5)