Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. how to solve the ScriptResource.axd exception problem?

how to solve the ScriptResource.axd exception problem?

Scheduled Pinned Locked Moved ASP.NET
designhelpcsharpasp-netdatabase
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mohammad ehsan
    wrote on last edited by
    #1

    hello. I have design a form with asp.net4 which is binded to Sqlserver 2008r2 , my form is made by Asp.Net formview that has to insert data into the database . i have also included my formview inside an UpdatePanel , but when press the insert button this exception in the is generated:

    Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Input string was not in a correct format.

    this exception occures in a locked dynamic page: ScriptResource.axd but whenever i remove the UpdatePanel from my form this exception doesn't occure again , but the other Unhandled exception occures : (in fact i don't want to remove UpdatePanel)

    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.

    <div style="display: block;" id="premain0" class="pre-action-link" width="100%">[FormatException: Input string was not in a correct format.] System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +9591147 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.ExecuteInsert(IDictionary values) +306 System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) +89 System.Web.UI.WebControls.FormView.HandleInsert(String commandArg, Boolean causesValidation) +377 System.Web.UI.WebControls.FormView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +612 System.Web.UI.WebControls.FormView.OnBubbleEvent(Object source, EventArgs e) +95 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebContro

    P K P 3 Replies Last reply
    0
    • M mohammad ehsan

      hello. I have design a form with asp.net4 which is binded to Sqlserver 2008r2 , my form is made by Asp.Net formview that has to insert data into the database . i have also included my formview inside an UpdatePanel , but when press the insert button this exception in the is generated:

      Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Input string was not in a correct format.

      this exception occures in a locked dynamic page: ScriptResource.axd but whenever i remove the UpdatePanel from my form this exception doesn't occure again , but the other Unhandled exception occures : (in fact i don't want to remove UpdatePanel)

      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.

      <div style="display: block;" id="premain0" class="pre-action-link" width="100%">[FormatException: Input string was not in a correct format.] System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +9591147 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.ExecuteInsert(IDictionary values) +306 System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) +89 System.Web.UI.WebControls.FormView.HandleInsert(String commandArg, Boolean causesValidation) +377 System.Web.UI.WebControls.FormView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +612 System.Web.UI.WebControls.FormView.OnBubbleEvent(Object source, EventArgs e) +95 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebContro

      P Offline
      P Offline
      Parwej Ahamad
      wrote on last edited by
      #2

      It's seems something issue with Data conversion. So check carefully for all data types wherever converting any input data. One more thing: Try to set the page attribute : EnableEventValidation="false"

      Parwej Ahamad

      1 Reply Last reply
      0
      • M mohammad ehsan

        hello. I have design a form with asp.net4 which is binded to Sqlserver 2008r2 , my form is made by Asp.Net formview that has to insert data into the database . i have also included my formview inside an UpdatePanel , but when press the insert button this exception in the is generated:

        Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Input string was not in a correct format.

        this exception occures in a locked dynamic page: ScriptResource.axd but whenever i remove the UpdatePanel from my form this exception doesn't occure again , but the other Unhandled exception occures : (in fact i don't want to remove UpdatePanel)

        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.

        <div style="display: block;" id="premain0" class="pre-action-link" width="100%">[FormatException: Input string was not in a correct format.] System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +9591147 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.ExecuteInsert(IDictionary values) +306 System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) +89 System.Web.UI.WebControls.FormView.HandleInsert(String commandArg, Boolean causesValidation) +377 System.Web.UI.WebControls.FormView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +612 System.Web.UI.WebControls.FormView.OnBubbleEvent(Object source, EventArgs e) +95 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebContro

        K Offline
        K Offline
        KSaiPrasad
        wrote on last edited by
        #3

        Hi, As per my understanding, its a data convertion issue, its trying to convert from a string to int. you can try below:

        CAST(MyVarcharCol AS INT))

        or

        CONVERT(INT, MyVarcharCol)

        1 Reply Last reply
        0
        • M mohammad ehsan

          hello. I have design a form with asp.net4 which is binded to Sqlserver 2008r2 , my form is made by Asp.Net formview that has to insert data into the database . i have also included my formview inside an UpdatePanel , but when press the insert button this exception in the is generated:

          Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Input string was not in a correct format.

          this exception occures in a locked dynamic page: ScriptResource.axd but whenever i remove the UpdatePanel from my form this exception doesn't occure again , but the other Unhandled exception occures : (in fact i don't want to remove UpdatePanel)

          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.

          <div style="display: block;" id="premain0" class="pre-action-link" width="100%">[FormatException: Input string was not in a correct format.] System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +9591147 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.ExecuteInsert(IDictionary values) +306 System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) +89 System.Web.UI.WebControls.FormView.HandleInsert(String commandArg, Boolean causesValidation) +377 System.Web.UI.WebControls.FormView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +612 System.Web.UI.WebControls.FormView.OnBubbleEvent(Object source, EventArgs e) +95 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebContro

          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #4

          You'll need to see what the actual value is. Step through with a debugger and/or add a try/catch to log the value somewhere.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups