protected void btnSaveChoice_Click(object sender, EventArgs e) { DataAccess.AssessmentItemXChoice objXChoice = new DataAccess.AssessmentItemXChoice(); objXChoice.AssessmentItemID = AssessmentItemID; objXChoice.IsDefault = chk_ChoiceIsDefault.Checked; objXChoice.Order = Convert.ToInt32(txtChoiceOrder.Text); objXChoice.ScoreValue = Convert.ToInt32(txtScoreValue.Text); objXChoice.Value = txtChoicevalue.Text; DataAccess.AssessmentItemChoice objChoice = null; if (gIsMultipleChoice) { objChoice = new AssessmentItemChoice() { Text = txtChoicevalue.Text }; } bool res = gAssessment.Save_Assessment_Item_X_Choice(objXChoice, objChoice); if (res == false) { Set_Error_Message("An error occured during assessment item X choice save process"); } else { ListChoice.Add(objXChoice); Prepare_Choice_Section(); } }