Asp.net 访问中继器中的行
我有一个网格视图,其中有一个中继器,我想获取子注释的id,但这给了我父注释idAsp.net 访问中继器中的行,asp.net,Asp.net,我有一个网格视图,其中有一个中继器,我想获取子注释的id,但这给了我父注释id protected void rChildComments_ItemCommand(object source, RepeaterCommandEventArgs e) { Button btnDeleteChildComment = (Button)e.Item.FindControl("btnDeleteChildComment"); if (e.CommandName == "DeleteCh
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;
}
}
我该怎么办?您还需要找到这样的子注释控件
DgItems.FindContol