Thanks everyone for your valuable inputs.
I solved the issue with below code.
bool valid1 = float.TryParse(lblCourseFee.Text, out CourseFee);
bool valid2 = float.TryParse(txtDiscount.Text, out Disc);
Found it on another website. Serves the purpose.
Thanks again.