protected void lnkBtnSubmit_Click(object sender, EventArgs e) { BLL.UserLib oUserLib = new BLL.UserLib(); Entity.UserInfo oUserInfo = new Entity.UserInfo(); oUserInfo.IntQuestionId = 0; oUserInfo.StrHeading = ddlTopic.SelectedItem.Text; oUserInfo.StrQuestion = txtQuestion.Text; if (oUserInfo.StrQuestion.Length > 500) oUserInfo.StrQuestion = oUserInfo.StrQuestion.Substring(0, 499); oUserInfo.StrAnswer = txtAnswer.Text; if (oUserInfo.StrAnswer.Length > 500) oUserInfo.StrAnswer = oUserInfo.StrAnswer.Substring(0, 499); oUserInfo.DtCreatedOn = DateTime.Now; oUserInfo.StrUserId = AppLib.GetLoggedInUserName(); if (Request.QueryString["id"] == null) { oUserInfo.ChrUserType = 'A'; if (oUserLib.InsertFAQ(oUserInfo)) { oUserLib = null; oUserInfo = null; Response.Redirect(AppConfig.GetBaseSiteUrl() + "BackOffice/Templates/ManageFaq.aspx?msg=ins", true); } else { lblMsg.Text = "FAQ already exists."; } } else { oUserInfo.IntFAQId = Convert.ToInt32(Request.QueryString["id"]); if (oUserLib.UpdateFAQ(oUserInfo)) { oUserLib = null; oUserInfo = null; Response.Redirect(AppConfig.GetBaseSiteUrl() + "BackOffice/Templates/ManageFaq.aspx?msg=up", true); } else { lblMsg.Text = "FAQ already exists."; } } // SendContactUsEmail(); }