protected void SaveImageButton_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            UserQuestion question = (UserQuestion)ViewState["Question"];
            question.Type = (UserQuestionType)QuestionTypeRadioButtonList.SelectedIndex;
            question.Name = NameTextBox.Text;
            if (question.Type == UserQuestionType.FreeAnswer)
            {
                question.Values.Clear();
                UserQuestionOption item = new UserQuestionOption(QuestionTextBox.Text);
                question.Values.Add(item);
            }
            else if (question.Type == UserQuestionType.MultipleChoice)
            {
                foreach (GridViewRow row in ValuesGridView.Rows)
                {
                    if (row.RowType == DataControlRowType.DataRow)
                    {
                        question.Values[row.RowIndex].Value = ((TextBox)row.FindControl("ValueTextBox")).Text;
                    }
                }
                question.Values.Add(new UserQuestionOption(QuestionTextBox.Text));
            }

            if (question.Bvin == string.Empty)
            {
                MTApp.MembershipServices.UserQuestions.Create(question);
            }
            else
            {
                MTApp.MembershipServices.UserQuestions.Update(question);
            }
            Response.Redirect("~/BVAdmin/People/UserSignupConfig.aspx");
        }
 protected void InitializeInput()
 {
     UserQuestion question = (UserQuestion)ViewState["Question"];
     QuestionTypeRadioButtonList.SelectedIndex = (int)question.Type;
     NameTextBox.Text = question.Name;
     if (question.Type == UserQuestionType.FreeAnswer)
     {
         MultipleChoicePanel.Visible = false;
         if (question.Values.Count == 0)
         {
             UserQuestionOption questionOption = new UserQuestionOption();
             questionOption.Bvin = System.Guid.NewGuid().ToString();
             question.Values.Add(questionOption);
         }
         QuestionTextBox.Text = question.Values[0].Value;
     }
     else if (question.Type == UserQuestionType.MultipleChoice)
     {
         MultipleChoicePanel.Visible = true;
         QuestionTypeRadioButtonList.SelectedIndex = (int)question.Type;
         BindQuestionOptionsGrid(question);
     }
 }
 protected void NewOptionImageButton_Click(object sender, System.Web.UI.ImageClickEventArgs e)
 {
     UserQuestion question = (UserQuestion)ViewState["Question"];
     UserQuestionOption questionOption = new UserQuestionOption();
     questionOption.Bvin = System.Guid.NewGuid().ToString();
     question.Values.Add(questionOption);
     BindQuestionOptionsGrid(question);
     ViewState["Question"] = question;
 }