Below are my codes:
<ajaxToolkit:TabPanel ID="tbpReorder" runat="server" HeaderText="Reorder">
<ContentTemplate>
<asp:SqlDataSource ID="sqlPhotos" runat="server" ConnectionString="<%$ ConnectionStrings:classNotesConnStr %>"
SelectCommand="SELECT * FROM [classNotesPhoto] WHERE ([albumID] = @albumID) ORDER BY [position]"
UpdateCommand="UPDATE [classNotesPhoto] SET [albumID] = @albumID, [fileName] = @fileName, [filePath] = @filePath, [caption] = @caption, [profilePhoto] = @profilePhoto, [albumPhoto] = @albumPhoto, [description] = @description, [position] = @position, [certify] = @certify, [dateInsert] = @dateInsert WHERE [photoID] = @photoID"
DeleteCommand="DELETE FROM [classNotesPhoto] WHERE [photoID] = @photoID"
InsertCommand="INSERT INTO [classNotesPhoto] ([albumID], [fileName], [filePath], [caption], [profilePhoto], [albumPhoto], [description], [position], [certify], [dateInsert]) VALUES (@albumID, @fileName, @filePath, @caption, @profilePhoto, @albumPhoto, @description, @position, @certify, @dateInsert)">
<SelectParameters>
<asp:QueryStringParameter Name="albumID" QueryStringField="album"
Type="Int32" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="photoID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="position" Type="Int32" />
<asp:Parameter Name="userID" />
<asp:Parameter Name="originalID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="albumID" Type="Int32" />
<asp:Parameter Name="fileName" Type="String" />
<asp:Parameter Name="filePath" Type="String" />
<asp:Parameter Name="caption" Type="String" />
<asp:Parameter Name="profilePhoto" Type="Boolean" />
<asp:Parameter Name="albumPhoto" Type="Boolean" />
<asp:Parameter Name="description" Type="String" />
<asp:Parameter Name="position" Type="Int32" />
<asp:Parameter Name="certify" Type="Boolean" />
<asp:Parameter DbType="DateTime" Name="dateInsert" />
</InsertParameters>
</asp:SqlDataSource>
<ajaxToolkit:ReorderList ID="rdlPhotos" runat="server" AllowReorder="True" SortOrderField="position"
DataSourceID="sqlPhotos" DataKeyField="photoID" PostBackOnReorder="False">
<DragHandleTemplate>
<div class="DragHandleClass">
</div>
</DragHandleTemplate>
<ItemTemplate>
<asp:Image ID="imgImage" runat="server" ImageUrl='<%# String.Format("{0}{1}", Eval("filepath"), Eval("filename")) %>'
Width="150px" />
</ItemTemplate>
</ajaxToolkit:ReorderList>
</ContentTemplate>
</ajaxToolkit:TabPanel>
I am following this tutorial. When I tried to reorder, I get this popup error:
Reorder failed, see details below. \r\n\r\nFailed to reorder.
Any idea why?