这是代码:
<asp:Repeater runat="server" ID="repeater1" OnItemCommand="checkChange">
<ItemTemplate>
<asp:Table runat="server" Width="80%">
<asp:TableRow runat="server" HorizontalAlign="Center" Width="80%">
<asp:TableCell Width="80%" HorizontalAlign="Left">
<asp:Button ID="Button1" runat="server" Text="删除" Visible="<%#administrator %>" />
<asp:CheckBox runat="server" ID="checkBox" Text='<%#DataBinder.Eval(Container.DataItem,"IID")%>' AutoPostBack="true" OnCheckedChanged="checkChange" EnableViewState="false"/>
<asp:Label runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"invText") %>'></asp:Label>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</ItemTemplate>
</asp:Repeater>
功能是:
protected void checkChange(object sender, EventArgs e)
{
Response.Write("it works well!");
}
但是当我单击复选框时,什么都没有发生...谢谢...