I have a new error on my page. I enter in a new grant, it does not have any budget data. When I click on the tab, this new error comes up. In the application, the user enters in a new Grant. There is in Budget data for the Grant. When a user selects the Budget tab, the page tries to retrieve the Grant's Budget data, but there is none in the table. The previous developer did not understand that with ASP.NET, you cannot get an empty record set.
Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
Line 42: conn.close()
Line 43: lblCurrencyName.text = session("CurrencyName")
Line 44: select case GrandTotalUSDValue.text > 250000
Line 45: case true
Line 46: 'GrandTotalUSDValue.cssclass="ColorUp"
Source File: D:\GrantManagementWeb\BudgetDataForm.aspx Line: 44
Stack Trace:
[FormatException: Input string was not in a correct format.]
Microsoft.VisualBasic.CompilerServices.DoubleType.Parse(String Value, NumberFormatInfo NumberFormat) +195
Microsoft.VisualBasic.CompilerServices.DoubleType.FromString(String Value, NumberFormatInfo NumberFormat) +84
[InvalidCastException: Cast from string "" to type 'Double' is not valid.]
Microsoft.VisualBasic.CompilerServices.DoubleType.FromString(String Value, NumberFormatInfo NumberFormat) +173
Microsoft.VisualBasic.CompilerServices.DoubleType.FromString(String Value) +7
ASP.BudgetDataForm_aspx.Page_Load(Object Sender, EventArgs e) in D:\GrantManagementWeb\BudgetDataForm.aspx:44
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
Line 42: conn.close()
Line 43: lblCurrencyName.text = session("CurrencyName")
Line 44: select case GrandTotalUSDValue.text > 250000
Line 45: case true
Line 46: 'GrandTotalUSDValue.cssclass="ColorUp"
Source File: D:\GrantManagementWeb\BudgetDataForm.aspx Line: 44
Stack Trace:
[FormatException: Input string was not in a correct format.]
Microsoft.VisualBasic.CompilerServices.DoubleType.Parse(String Value, NumberFormatInfo NumberFormat) +195
Microsoft.VisualBasic.CompilerServices.DoubleType.FromString(String Value, NumberFormatInfo NumberFormat) +84
[InvalidCastException: Cast from string "" to type 'Double' is not valid.]
Microsoft.VisualBasic.CompilerServices.DoubleType.FromString(String Value, NumberFormatInfo NumberFormat) +173
Microsoft.VisualBasic.CompilerServices.DoubleType.FromString(String Value) +7
ASP.BudgetDataForm_aspx.Page_Load(Object Sender, EventArgs e) in D:\GrantManagementWeb\BudgetDataForm.aspx:44
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
Last edited: