In my web application, i need to display grid view in one column message string type that column have float data type in database. I am trying to convert string to float data type but it is not display properly what i have to do.
I tried this:
VB.NET
string str1 = "Hi hello";
float f = float.Parse(str1);
dt.Rows[i].SetField("Column Name",f);
I am getting Exception like "Input string was not in a correct format".
Is It Possible to convert string to float. Can anyone tell me how to do this.
Thank you
Vinay SinghRank #604 · 4K reputationPosted Aug 30, 2016, 3:41 AM EDT
Vasanth NatarajanRank #3,352 · 429 reputationPosted Aug 30, 2016, 5:11 AM EDT