private void SaveFAQ(object sender, EventArgs eventArgs) { int id = Convert.ToInt32(hdnEditFaq.Value); string category = ddlCategory.SelectedValue; string question = tbxQuestion.Text; string answer = tbxAnswer.Text; int order = tbxQorder.Text == "" ? 0 : Convert.ToInt32(tbxQorder.Text); FaqInfo faq = SnitzFaq.GetFaqQuestion(id, CultureInfo.CurrentCulture.TwoLetterISOLanguageName); faq.Order = order; faq.CatId = Convert.ToInt32(category); faq.LinkTitle = question; faq.LinkBody = answer; SnitzFaq.UpdateFaqQuestion(faq); Response.Redirect(this.Request.RawUrl); }
protected void Save(object sender, ImageClickEventArgs e) { int id = Convert.ToInt32(hdnFaqId.Value); string category = feCategory.SelectedValue; string question = feTitle.Text; string answer = feBody.Text; int order = feOrder.Text == "" ? 0 : Convert.ToInt32(feOrder.Text); FaqInfo faq = SnitzFaq.GetFaqQuestion(id, CultureInfo.CurrentCulture.TwoLetterISOLanguageName); faq.Order = order; faq.CatId = Convert.ToInt32(category); faq.Link = String.Format("/{0}/{1}", feCategory.SelectedItem.Text, question); faq.LinkTitle = question; faq.LinkBody = answer; SnitzFaq.UpdateFaqQuestion(faq); Response.Redirect(this.Request.RawUrl); }