Repeater 的 OnItemDataBound 事件
.aspx
<asp:Repeater ID="RepeaterSite" runat="server" OnItemDataBound="RepeaterSite_ItemCommand">
</asp:Repeater>
.aspx.cs
protected void RepeaterSite_ItemCommand(object source, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.SelectedItem)
{
double ndljsjl = Convert.ToDouble((e.Item.FindControl("txtndljsjl") as TextBox).Text);
}
}