Asp.Net Hein

Asp.Net Hein

  • NA
  • 266
  • 166.4k

double to decimal place

Jun 18 2015 11:45 PM
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)