I want to update and sum a num paramter to my database… Got Problem… Gridview

前端 未结 2 1690
名媛妹妹
名媛妹妹 2021-01-29 12:14

I want to Update An Number of goals That a Player Scored so if he socred a goal I want to do an update for his number of goals... I got an Error in my Code And I don\'t know how

2条回答
  •  再見小時候
    2021-01-29 13:02

    @Alex It seems to be like a format exception at the line int a = int.Parse((SoccerTable.FooterRow.FindControl("txtAchNumsFooter") as TextBox).Text.Trim());.

    In your case, the possibility is that the value return by the textbox is not a valid integer value. Thats why you are getting this error.

    Can you try debugging your code and do quickwatch on this statement 'SoccerTable.FooterRow.FindControl("txtAchNumsFooter") as TextBox).Text.Trim()'. Check what you get.

提交回复
热议问题