日期:2014-05-17 浏览次数:20950 次
<asp:Repeater ID="rep_Payment" runat="server">
<ItemTemplate>
<tr class="row">
<td>
<%# Eval("td0")%>
</td>
<td>
<%# Eval("td1")%>
</td>
<td>
<%# Eval("td2")%>
</td>
<td>
<%# Eval("td3")%>
</td>
<td align="center">
<input type="button" value="Edit" onclick="onEdit(<%# Eval("ID")%>);"/>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
<div style="display: none">
<asp:HiddenField ID="HiddenField_ID" runat="server" />
<asp:Button runat="server" ID="btn_Edit" OnClick="btn_Edit_Click" />
</div>
<script language="javascript" type="text/javascript">
function onEdit(itemID) {
document.getElementById("<%=HiddenField_ID.ClientID%>").value=itemID;
document.getElementById("<%=btn_Edit.ClientID %>").click();
}
</script>