Error message during Databind in C#/Visual Studio 2008
Posted on 2008-06-19
I am trying to databind an integer from a text box and am getting the following error:
System.FormatException was unhandled
Message="Input string was not in a correct format."
I am successfully populating a text box with a number - say 21139.
This is the line of code I am getting the error on:
mortgee.MortId = int.Parse(this.txtNextMortId.Text.ToString());
Where mortgee is a business object i have created, and MortId is a public member that is an integer.
Any Ideas.. I hope I described this ok.
I try to bind to this value with the below code: