We help IT Professionals succeed at work.
Get Started

HELP!!!! System.FormatException: Input string was not in a correct format. in GridView RowUpdating Event

mnichols1202
mnichols1202 asked
on
632 Views
Last Modified: 2010-05-18


I've tried everything!!!! I have other pages that work fine. This refuses to work!

Here is the RowUpdating Event Code.

        SqlDataSource1.UpdateParameters("REG_ID").DefaultValue = Session("RegID")
        SqlDataSource1.UpdateParameters("CSA_Major_Topic_Category_ID").DefaultValue = 1
        SqlDataSource1.UpdateParameters("CSA_Specialized_Service_Description").DefaultValue = "Mike"
        SqlDataSource1.UpdateParameters("CSA_Distance_Limitation_Applies").DefaultValue = False
        SqlDataSource1.UpdateParameters("CSA_Service_Charge_By_Type_ID").DefaultValue = 1
        SqlDataSource1.UpdateParameters("CSA_Service_Charge_Amount").DefaultValue = 2
        SqlDataSource1.UpdateParameters("CSA_Specialized_Service_Keywords_Entered").DefaultValue = False

(I added the hard values because i know they work.  If i load those into the Stored proc directly they work fine!)


Here the Params from asp:

                    <UpdateParameters>
                        <asp:Parameter Name="ID" Type="Decimal" />
                        <asp:Parameter Name="REG_ID" Type="Decimal" />
                        <asp:Parameter Name="CSA_Major_Topic_Category_ID" Type="Decimal" />
                        <asp:Parameter Name="CSA_Specialized_Service_Description" Type="String" />
                        <asp:Parameter Name="CSA_Distance_Limitation_Applies" Type="Boolean" />
                        <asp:Parameter Name="CSA_Service_Charge_By_Type_ID" Type="Decimal" />
                        <asp:Parameter Name="CSA_Service_Charge_Amount" Type="Decimal" />
                        <asp:Parameter Name="CSA_Specialized_Service_Keywords_Entered" Type="Boolean" />
                    </UpdateParameters>


No matter what i do i get "System.FormatException: Input string was not in a correct format."

The stack trace is useless!!! I'll post if you think it'll help

I'm at a loss as to even figure out how to begin to figure this one out.  I've tried everything i know.
500 points cause this is URGENT! So urgent in fact i'd give 1000 points if i could!
Comment
Watch Question
Commented:
This problem has been solved!
Unlock 1 Answer and 10 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE