<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<link type="text/css" href="CSS/StyleSheet.css" rel="Stylesheet" />
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div>
<cc1:ReorderList ID="ReorderList1" runat="server" DataSourceID="SqlDataSource1"
SortOrderField="sortid" DragHandleAlignment="Right" Width="298px">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("name") %>' Font-Bold="True"></asp:Label>
<asp:Label ID="Label2" runat="server" Text='<%# Eval("id") %>' ForeColor="#999999"></asp:Label>
</ItemTemplate>
<DragHandleTemplate><div class="dragHandle"></div></DragHandleTemplate>
</cc1:ReorderList>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:dnt2ConnectionString %>" ConflictDetection="CompareAllValues"
OldValuesParameterFormatString="id_{0}"
SelectCommand="SELECT id, name, sortid FROM Sort ORDER BY sortid"
UpdateCommand="UPDATE Sort SET sortid = @sortid WHERE (id = @id)">
<UpdateParameters>
<asp:Parameter Name="sortid" />
<asp:Parameter Name="id" />
</UpdateParameters>
</asp:SqlDataSource>
</form>
</body>
</html>
ReoederList
最新推荐文章于 2026-06-26 08:52:47 发布
本文介绍了一个 ASP.NET 页面中 ReorderList 控件的应用实例,该控件允许用户通过拖放操作来重新排列列表项。页面还包含了用于获取列表数据的 SqlDataSource 组件,并能够更新排序后的列表项。

435

被折叠的 条评论
为什么被折叠?



