I am getting this error:
Cannot convert type 'string' to 'float'
on following lines of code:
float x=(float )(TextBox_item_price.Text);
How can I solve this?
You can not use type casting between incompatible types, use Single.TryParse or Convert.ToSingle
To convert between non-compatible types, such as integers and System.DateTime objects, or hexadecimal strings and byte arrays, you can use the System.BitConverter class, the System.Convert class, and the Parse methods of the built-in numeric types, such as Int32.Parse.
TextBox_item_price.Textexactly?TextBox_item_price.Textexactly and whichCultureOP's using..