protected void lstAllReplies_ItemCommand(object sender, ListViewCommandEventArgs e) { divSuccess.Style.Add("display", "none"); PopUpShare.Style.Add("display", "none"); divSuccess.Style.Add("display", "none"); DataTable dtAns = new DataTable(); LinkButton lnkClose = (LinkButton)e.Item.FindControl("lnkClose"); HiddenField hdnintAddedBy = (HiddenField)e.Item.FindControl("hdnintAddedBy"); HiddenField hdnQAReplyLikeShareId = (HiddenField)e.Item.FindControl("hdnQAReplyLikeShareId"); Label lblReplyComment = e.Item.FindControl("lblReplyComment") as Label; ViewState["QAReplyLikeShareId "] = hdnQAReplyLikeShareId.Value; if (e.CommandName == "View More") { GetAllReplies(); divSuccess.Style.Add("display", "none"); } else if (e.CommandName == "View Close") { GetAllReplies(); divSuccess.Style.Add("display", "none"); } else if (e.CommandName == "Edit Ans") { ViewState["Edit"] = hdnQAReplyLikeShareId.Value; objDOQAPosting.intQAReplyLikeShareId = Convert.ToInt32(hdnQAReplyLikeShareId.Value); dtAns = objDAQAPosting.GetDataTable(objDOQAPosting, DA_Scrl_UserQAPosting.QuetionAns.GetCommentByID); if (dtAns.Rows.Count > 0) { CKEditorControl.InnerText = Convert.ToString(dtAns.Rows[0]["strComment"]); CKEditorControl.Focus(); ClientScript.RegisterStartupScript(this.GetType(), "hash", "location.hash = '#editqa';", true); } } else if (e.CommandName == "Delete Ans") { ViewState["lblReplyComment"] = lblReplyComment.Text; divDeletesucess.Style.Add("display", "block"); } else if (e.CommandName == "Details") { Response.Redirect("Home.aspx?RegId=" + hdnintAddedBy.Value); } }
protected void lstParentQADetails_ItemCommand(object sender, ListViewCommandEventArgs e) { HiddenField hdnPostQuestionID = (HiddenField)e.Item.FindControl("hdnPostQuestionID"); LinkButton btnLike = (LinkButton)e.Item.FindControl("btnLike"); divDeletesucess.Style.Add("display", "none"); divSuccess.Style.Add("display", "none"); PopUpShare.Style.Add("display", "none"); objDOQAPosting.intPostQuestionId = Convert.ToInt32(hdnPostQuestionID.Value); if (e.CommandName == "LikeForum") { string ip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; if (ip == null) { ip = Request.ServerVariables["REMOTE_ADDR"]; } objDOQAPosting.strIPAddress = ip; objDOQAPosting.strRepLiShStatus = "LI"; objDOQAPosting.intAddedBy = Convert.ToInt32(ViewState["UserID"]); objDOQAPosting.intPostQuestionId = Convert.ToInt32(hdnPostQuestionID.Value); objDAQAPosting.AddEditDel_Scrl_UserQueAnsPostingTbl(objDOQAPosting, DA_Scrl_UserQAPosting.QuetionAns.LikeQAInsert); PopUpShare.Style.Add("display", "none"); } if (e.CommandName == "QADetails") { Response.Redirect("Question-Details-SendContact.aspx?PostQAId=" + hdnPostQuestionID.Value); } if (e.CommandName == "ShareForum") { divSuccess.Style.Add("display", "none"); clearsharepopup(); string path = Request.Url.AbsoluteUri; txtLink.Text = path; PopUpShare.Style.Add("display", "block"); ViewState["PostQuestionID"] = Convert.ToInt32(hdnPostQuestionID.Value); } if (e.CommandName == "ReplyPost") { PopUpShare.Style.Add("display", "none"); CKEditorControl.Focus(); pnlComment.Style.Add("display", "block"); divSuccess.Style.Add("display", "none"); } BindQADetails(); }