<asp:HiddenField ID="hfValues" runat="server" />
<table class="li_Tb">
<tr>
<td width="5%">
名称
</td>
<td width="8%">
原有顺序
</td>
<td width="5%">
更改顺序
</td>
<td width="5%">
更改
</td>
</tr>
<asp:Repeater ID="rptProductList" runat="server" OnItemCommand="rptProductList_ItemCommand">
<ItemTemplate><tr>
<td>
<%#Eval("Name_CH")%>
</td>
<td>
<%# Eval("SortOrder")%>
</td>
<td>
<%# "<input type='text' id='txtRanking" + Eval("SeqNo") + "' />"%>
</td>
<td>
<asp:Button ID="btnRanking" OnClientClick='<%#Eval("SeqNo","javascript:return assignment({0});")%>'
runat="server" Text="修改" CommandArgument='<%#Eval("SeqNo")%>' CommandName="Edit" />
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<script type="text/javascript">
var hfValues = document.getElementById("ContentPlace_hfValues");
function assignment(id) {
var txtRanking = document.getElementById("txtRanking" + id);
if (txtRanking.value != "") {
hfValues.value = txtRanking.value;
return true;
} else {
alert("更改顺序不能为空!");
return false;
}
return false;
}
</script>