Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

data conversion error

Status
Not open for further replies.

dollarbillg

Programmer
Dec 3, 2002
12
0
0
US
Help

After the user enters data in a textbox and has moved to another control on the form. If the user needs to change previosly entered data in that text box and clicks the mouse to change the data I get the following error.



An unhandled exception of type 'System.InvalidCastException' occurred in system.windows.forms.dll

Additional information: Cast from string "" to type 'Double' is not valid.

Please Help!
 
Is the textbox bound to a data object (a field in a datatable maybe)? If so then that field may be of the Double type. You'd then have to convert the string to a number if you're expecting the user to update the datatable.

O.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top