Code:
decimal pgr = decimal.Parse("$ 499.00");
I am getting the error message as
System.FormatException: Input string was not in a correct format.
How to parse a value to decimal?
try removing the string first,
decimal pgr = decimal.Parse("$ 499.00".Replace("$", "").Replace(" ", ""));
.Replace(" ", "")
was added in the code to remove all spaces either trailing, leading or in between.