Author: gnout | Posted on: 3/22/2009 3:13:30 PM | Views : 369

 Hello,
I have a FormView control databound to an SqlDataSource. Inside the FormView I have a TextBox wich is databind to a field of type real (The html code for the databinding is something like Text='<%# Bind("REALFIELD", "{0:N}") %>' ). I also have a CompareValidator control to ensure that the user will enter a valid real (double) number and not something else. If the field contains the number 12345,8 (I will use the comma"," for decimal separator and the point "." for thousand separator) then in the TextBox the number is presented as 12.345,80. The problem is that when I'm trying to post, the CompareValidator complains that the "12.345,80" is not a valid double number. I have to remove the thousand separator (the number will become "12345,80") in order to pass the check from the CompareValidator.
I can easily make the TextBox present the number without the thousand separator (I can cha ...

Go to the complete details ...