mmm that´s really interesting and it works fine here...anyways i´ve seen similar problems while using a German OS and working with Decimal values on SQL databases in a English SQL Server.. atm am using a english one tho.
anyways this code works great for me:
Code:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim d1 As Double
d1 = CDbl("12,2")
TextBox1.Text = d1.ToString()
End Sub
End Class
btw i used the method .ToString() instead of CStr() because i think its better..
anyways you could use a Try-Catch and post the message here so i can see more info about the problem.. something like that:
Code:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim d1 As Double
Try
d1 = CDbl("12,2")
TextBox1.Text = d1.ToString()
Catch ex As Exception
Throw New ArgumentException(ex.Message)
End Try
End Sub
End Class
other than that i recommend you to set a break point at the start of the page_load event and step through(F10 or F11) and find out where it fails and in that way see the reason why it fail to cast??? at least it seems to be the problem.