I can\'t understand why this won\'t work
decimal? compRetAmount = !string.IsNullOrEmpty(txtLineCompRetAmt.Text) ? decimal.Parse(txtLineCompRetAmt.Text.R
You need to cast the first part to decimal?
decimal?
decimal? compRetAmount = !string.IsNullOrEmpty(txtLineCompRetAmt.Text) ? (decimal?)decimal.Parse(txtLineCompRetAmt.Text.Replace(",","")) : null;