我有一个网格视图,其中有一个转发器,我想得到子评论的ID,但这给了我父母评论ID
protected void rChildComments_ItemCommand(object source, RepeaterCommandEventArgs e)
{
Button btnDeleteChildComment = (Button)e.Item.FindControl("btnDeleteChildComment");
if (e.CommandName == "DeleteChildComment")
{
Control c = e.Item.NamingContainer.Parent;
// Guid mcID = new Guid(e.Item.Cells[0].Text);
//MemberFacade.DeleteMemberPublicChildComments(mcID);
//Response.Redirect("profile.aspx" + "?mid=" + ProfileID);
DataGridItem DgItems = (DataGridItem)c.NamingContainer;
string text = DgItems.Cells[0].Text;
}
}
我该怎么办?
答案 0 :(得分:0)
您还需要找到像这样的儿童评论控制
DgItems.FindContol