Posted on: 12/30/2014 12:52:45 PM | Views : 549

I am trying to perform an operation on button click which will return the result in Kilo Per Dozen and the digits has to be decimal digits. I am using decimal type variable to hold the result and want to display this result within a label control. This is what I have done so far on button click-
protected void btn1_Click(object sender, EventArgs e) { decimal kpdzn = 18480960 / 10000000; Label8.Text = string.Format("{0:n2}", kpdzn); } Here I am trying to display result "1.84" within label control. But after doing as mentioned above I am getting result "1.00" which is not correct. Please guide me where I am doing wrong.

Go to the complete details ...