How to add update parameter to SQLDataSource in c#
问题 In reference to my question, How to get boundfield value, or am I totally wrong? I am trying to add update parameter to a SQLDataSource using c# instead of ASP.NET but I am getting error, protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e) { int userID = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Values["userID"].ToString()); string userName = ""; string city = ""; string updateStatement = "Update myTable set userName=@userName, city=@city where userID=@userID";