ASP .net, Trying to read stack Trace

Hi Everyone,
I am kind of new with ASP so bear with me. I am getting an error message when I try to update a record using a Listview. Since I have no idea how to read the stack trace, I was wondering if anyone with more experience could help.

Here is the error that pops up in the window after I try to update:

Server Error in '/DatabaseProd' Application.

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:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:

[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +9594283
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +119
   System.String.System.IConvertible.ToInt32(IFormatProvider provider) +46
   System.Convert.ChangeType(Object value, TypeCode typeCode, IFormatProvider provider) +297
   System.Web.UI.WebControls.Parameter.GetValue(Object value, String defaultValue, TypeCode type, Boolean convertEmptyStringToNull, Boolean ignoreNullableTypeChanges) +126
   System.Web.UI.WebControls.Parameter.GetValue(Object value, Boolean ignoreNullableTypeChanges) +63
   System.Web.UI.WebControls.SqlDataSourceView.AddParameters(DbCommand command, ParameterCollection reference, IDictionary parameters, IDictionary exclusionList, String oldValuesParameterFormatString) +550
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) +346
   System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +95
   System.Web.UI.WebControls.ListView.HandleUpdate(ListViewItem item, Int32 itemIndex, Boolean causesValidation) +1226
   System.Web.UI.WebControls.ListView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +482
   System.Web.UI.WebControls.ListView.OnBubbleEvent(Object source, EventArgs e) +233
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   System.Web.UI.WebControls.ListViewDataItem.OnBubbleEvent(Object source, EventArgs e) +112
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +125
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +167
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563


Who is Participating?
Rahul GadeSr. ArchitectCommented:
If you start reading the trace from the bottom, you will notice that SqlDataSourceView.AddParameters has actual faced the problem while converting one of your string value to numeric using StringToNumber function.
Check with your data:
1. You might have mapped some string column with numeric.
2. By mistake one of the column might be showing some number with some char that is not convertible into number.
3. Your value is non-null, as null can not be formated as number

-Rahul Gade
jonsuns7Author Commented:
You're awesome Rahul

Thank You so much
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.