Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/blackberry/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 访问中继器中的行_Asp.net - Fatal编程技术网

Asp.net 访问中继器中的行

Asp.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

我有一个网格视图,其中有一个中继器,我想获取子注释的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;
    }
}

我该怎么办?

您还需要找到这样的子注释控件

DgItems.FindContol