string query = "update Questionnaire_UserAnswers set Comments='" + (TextBox)grdView.Rows[0].Cells[e.index].Controls[0] + "', Marks=" + (TextBox)grdView.Rows[4].Cells[e.index].Controls[0] + " where Question_ID=" + (TextBox)grdView.Rows[0].Cells[e.index].Controls[0] + "UserName='" + Request.QueryString["UserName"] + "'";
correct the update command Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Web.UI.WebControls.TextBox'.
Controls[0]
TextBox
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)