我绑定数据到一个DataList1 然后DataList1中嵌入了一个DataList2,DataList2是跟据DataList1中的数据进行绑定的,DataList2中嵌放的LinkButton它的事件怎么触发?
<table>
<asp:repeater id="RepeaterCategoryRoot" runat="server">
<ItemTemplate><tr><td>
<asp:Label id=rootCategory Runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "categoryDesc") %> ' Font-Bold="True">
</asp:Label></td></tr>
<tr><td>
<asp:DataList id="DateListCategory" RepeatColumns=4 RepeatDirection=Horizontal Runat="server" DataSource= '<%# ((CategoryNode)Application["CatalogRootNode"]).getActiveChildCategories((int)(DataBinder.Eval(Container.DataItem, "idCategory"))) %>'>
<ItemTemplate><table><tr><td width=120>
<asp:LinkButton Runat=server ID=categoryDesc CausesValidation=False Text='<%#DataBinder.Eval(Container.DataItem,"categoryDesc")%>' CommandArgument='<%# DataBinder.Eval(Container.DataItem,"idCategory")%> ' CommandName="CommandCateogry">
</asp:LinkButton></td></tr></table>
</ItemTemplate>
</asp:DataList></td></tr>
</ItemTemplate>
</asp:repeater></table>
<table>
<asp:repeater id="RepeaterCategoryRoot" runat="server">
<ItemTemplate><tr><td>
<asp:Label id=rootCategory Runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "categoryDesc") %> ' Font-Bold="True">
</asp:Label></td></tr>
<tr><td>
<asp:DataList id="DateListCategory" RepeatColumns=4 RepeatDirection=Horizontal Runat="server" DataSource= '<%# ((CategoryNode)Application["CatalogRootNode"]).getActiveChildCategories((int)(DataBinder.Eval(Container.DataItem, "idCategory"))) %>'>
<ItemTemplate><table><tr><td width=120>
<asp:LinkButton Runat=server ID=categoryDesc CausesValidation=False Text='<%#DataBinder.Eval(Container.DataItem,"categoryDesc")%>' CommandArgument='<%# DataBinder.Eval(Container.DataItem,"idCategory")%> ' CommandName="CommandCateogry">
</asp:LinkButton></td></tr></table>
</ItemTemplate>
</asp:DataList></td></tr>
</ItemTemplate>
</asp:repeater></table>
请高手指点
{
((DataList)(e.Item.FindControl("DataListCategory"))).ItemCommand+=new System.Web.UI.WebControls.DataListCommandEventHandler(this.DataListCategory_ItemCommand);
}
{
if(e.CommandName=="CommandCateogry")
{
Response.Redirect(string.Format("ProductList.aspx?idCategory={0}",e.CommandArgument));
}
} private void RepeaterCategoryRoot_ItemCreated(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
{
((DataList)(e.Item.FindControl("DataListCategory"))).ItemCommand+=new System.Web.UI.WebControls.DataListCommandEventHandler(this.DataListCategory_ItemCommand);
}