protected void btnUpdate_Click(object sender, EventArgs e) { try { if (!string.IsNullOrEmpty(txtQuestion.Text.Trim()) && !string.IsNullOrEmpty(txtAnswer.Text.Trim())) { BCAppAdmin appAdmin = new BCAppAdmin(); if (string.IsNullOrEmpty(hdnFAQId.Value)) { appAdmin.InsertFAQ(txtQuestion.Text, txtAnswer.Text, Convert.ToInt32(Session["UserId"])); } else { appAdmin.UpdateFAQ(Convert.ToInt32(hdnFAQId.Value), txtQuestion.Text, txtAnswer.Text); } hdnFAQId.Value = string.Empty; txtQuestion.Text = string.Empty; txtAnswer.Text = string.Empty; _BindFAQ(); } } catch (Exception) {} }