I am storing a decimal point from a textbox into a variable like this:
decimal hiOld = Decimal.Parse(hiCommOld.Text);
So, basically hiOld is storing something like this: 46.88. But when I am doing this:
ev.hiOldNew = (float)hiOld;
My system is storing 45.6677878899988 (something like this) number in the DB. My DB type is Float. All I want to store this variable as 46.88 into the DB.
How should I do this?