protected void lbtnCommentLikeUser_Click(object sender, EventArgs e) { GridViewRow row = ((GridViewRow)((LinkButton)sender).NamingContainer); HiddenField hfId = (HiddenField)row.FindControl("HiddenFieldId"); GridView gridviewLikesUser = (GridView)row.FindControl("GridViewLikesCommentUser"); gridviewLikesUser.DataSource = LikesBLL.getLikesTop(Global.WALL_COMMENT, hfId.Value); gridviewLikesUser.DataBind(); }
//protected void lbtnLike_Click(object sender, EventArgs e) //{ // GridViewRow row = ((GridViewRow)((LinkButton)sender).NamingContainer); // LinkButton linkLike = (LinkButton)row.FindControl("lbtnLike"); // Label labelLike = (Label)row.FindControl("lblLike"); // HiddenField hfId = (HiddenField)row.FindControl("HiddenFieldId"); // if (linkLike.Text == "Like") // { // UserBO objUser = new UserBO(); // objUser = UserBLL.getUserByUserId(Session["UserId"].ToString()); // LikesBO objClass = new LikesBO(); // objClass.AtId = hfId.Value; // objClass.Type = Global.WALL; // objClass.UserId = Session["UserId"].ToString(); // objClass.FirstName = objUser.FirstName; // objClass.LastName = objUser.LastName; // LikesBLL.insertLikes(objClass); // labelLike.Text = "You Like this"; // linkLike.Text = "UnLike"; // } // else // { // LikesBO objClass = new LikesBO(); // objClass.AtId = hfId.Value; // objClass.Type = Global.WALL; // objClass.UserId = Session["UserId"].ToString(); // LikesBLL.unLikes(objClass); // labelLike.Text = ""; // linkLike.Text = "Like"; // } // LoadWall(50); //} // @@@@@@@@@@@@@@@@@@@@ by Nabeel protected void lbtnUser_Click(object sender, EventArgs e) { GridViewRow row = ((GridViewRow)((LinkButton)sender).NamingContainer); LinkButton linkLike = (LinkButton)row.FindControl("lbtnLike"); HiddenField hfId = (HiddenField)row.FindControl("HiddenFieldId"); GridView gridviewLikesUser = (GridView)row.FindControl("GridViewLikesUser"); gridviewLikesUser.DataSource = LikesBLL.getLikesTop(Global.WALL, hfId.Value); gridviewLikesUser.DataBind(); // LoadWall(50); }