I have a GridView-Control with labels which contain numbers in percentformat, which are formatted in the RowDataBound-Event, but when I try to update the GridView i get the Invalid String format Exception because the labels are in the percentage Format like -27,5% but i need this number as double-value like 0.275. How can I convert the number from percentage to number? Any idea?
Thanks in forward,
Dim str as string = percentlabel.Text ' Get rid of percentage sign str = str.Replace("%", "") ' Check if you can convert dim dbl as double if not (double.tryparse(str, db)) then exit sub ' Successfully converted ' divide by 100 to get percent dbl = dbl / 100