K
Kivak Wolf
Hey everyone,
I have a textbox in my web page that is going to be used to enter an
E-mail into (just plain text, no HTML). Now, this will interact with a
SQL database where the contents of the textbox are sent from the SQL
database to the textbox, then the user edits it, and then the text
inside the textbox is sent back to the SQL database.
I did it the same way as if i had used a VarChar instead of a type
"text" variable in the SQL database, except I changed it to type "text"
on both the SQL database and in the parameters for the SQL statement in
ASP.NET. But for some reason, it still says there is a problem with the
formatting.
This is the error I get:
(Mind you this is in ASP.NET 2.0 so please answer in ASP.NET 2.0 so it
works. =D)
----------------------------------------------------------------------------
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)
+2637199
System.Number.ParseInt32(String s, NumberStyles style,
NumberFormatInfo info) +102
System.String.System.IConvertible.ToInt32(IFormatProvider provider)
+43
System.Convert.ChangeType(Object value, TypeCode typeCode,
IFormatProvider provider) +293
System.Web.UI.WebControls.SqlDataSourceView.AddParameters(DbCommand
command, ParameterCollection reference, IDictionary parameters,
IDictionary exclusionList, String oldValuesParameterFormatString) +609
System.Web.UI.WebControls.SqlDataSourceView.ExecuteUpdate(IDictionary
keys, IDictionary values, IDictionary oldValues) +363
System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary
values, IDictionary oldValues, DataSourceViewOperationCallback
callback) +78
System.Web.UI.WebControls.FormView.HandleUpdate(String commandArg,
Boolean causesValidation) +1144
System.Web.UI.WebControls.FormView.HandleEvent(EventArgs e, Boolean
causesValidation, String validationGroup) +643
System.Web.UI.WebControls.FormView.OnBubbleEvent(Object source,
EventArgs e) +95
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs
args) +35
System.Web.UI.WebControls.FormViewRow.OnBubbleEvent(Object source,
EventArgs e) +109
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs
args) +35
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)
+115
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String
eventArgument) +134
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+180
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+5670
I have a textbox in my web page that is going to be used to enter an
E-mail into (just plain text, no HTML). Now, this will interact with a
SQL database where the contents of the textbox are sent from the SQL
database to the textbox, then the user edits it, and then the text
inside the textbox is sent back to the SQL database.
I did it the same way as if i had used a VarChar instead of a type
"text" variable in the SQL database, except I changed it to type "text"
on both the SQL database and in the parameters for the SQL statement in
ASP.NET. But for some reason, it still says there is a problem with the
formatting.
This is the error I get:
(Mind you this is in ASP.NET 2.0 so please answer in ASP.NET 2.0 so it
works. =D)
----------------------------------------------------------------------------
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)
+2637199
System.Number.ParseInt32(String s, NumberStyles style,
NumberFormatInfo info) +102
System.String.System.IConvertible.ToInt32(IFormatProvider provider)
+43
System.Convert.ChangeType(Object value, TypeCode typeCode,
IFormatProvider provider) +293
System.Web.UI.WebControls.SqlDataSourceView.AddParameters(DbCommand
command, ParameterCollection reference, IDictionary parameters,
IDictionary exclusionList, String oldValuesParameterFormatString) +609
System.Web.UI.WebControls.SqlDataSourceView.ExecuteUpdate(IDictionary
keys, IDictionary values, IDictionary oldValues) +363
System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary
values, IDictionary oldValues, DataSourceViewOperationCallback
callback) +78
System.Web.UI.WebControls.FormView.HandleUpdate(String commandArg,
Boolean causesValidation) +1144
System.Web.UI.WebControls.FormView.HandleEvent(EventArgs e, Boolean
causesValidation, String validationGroup) +643
System.Web.UI.WebControls.FormView.OnBubbleEvent(Object source,
EventArgs e) +95
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs
args) +35
System.Web.UI.WebControls.FormViewRow.OnBubbleEvent(Object source,
EventArgs e) +109
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs
args) +35
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)
+115
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String
eventArgument) +134
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+180
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+5670