protected void rgvQuestions_InsertCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e) { var ddlNeedComment = (DropDownList)e.Item.FindControl("ddlNeedComment"); var txtQuestion = (TextBox)e.Item.FindControl("txtQuestion"); if (ddlNeedComment != null && txtQuestion != null) { var question = new PollQuestionDTO { NeedComment = Convert.ToBoolean(Convert.ToInt32(ddlNeedComment.SelectedItem.Value)), Question = txtQuestion.Text, PollId = Convert.ToInt32(Request.QueryString["pid"]) }; if (eb.AddOrUpdatePollQuestion(question)) { rgvQuestions.Rebind(); } } }