title: Ajax reorder list not dragable
body: <p>I have the same problem as Simon in <a href="https://stackoverflow.com/questions/1694501/ajax-reorder-list-not-draggable.">this post</a>.</p>
  
  <p>He found out some sort of a solution, but it does not work for me. Please, could someone explain me what is going on in this answer or advice me something else.</p>
  
  <p>PS: there is an <a href="http://www.asp.net/ajax/tutorials/drag-and-drop-via-reorderlist-cs" rel="nofollow noreferrer">example on the asp.net site</a> which doesn't work exactly the same way as my reorder list... (click view a demo)</p>
  
  <p>The solution that is suggested here adds these few lines to web.config: </p>
  
  <pre><code>&lt;httpHandlers&gt; 
  
    &lt;add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/&gt; 
  
  &lt;/httpHandlers&gt; 
  </code></pre>
  
  <p>Perhaps I just need to change something to make it work... but I don't know what. For example I have no idea what the ScriptResource.axd is supposed to be.</p>
  
  <p>My code: .aspx file</p>
  
  <pre><code>    &lt;%@ Page Title="" Language="C#" MasterPageFile="~/editor/editor_template.Master" AutoEventWireup="true" CodeBehind="menuEditor.aspx.cs" Inherits="WebPageEditor.editor.menuEditor" %&gt;
  
  &lt;%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %&gt;
      &lt;asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"&gt;
  
      &lt;asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"&gt;
  &lt;/asp:ScriptManager&gt;
  
      &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server"&gt;
      &lt;ContentTemplate&gt;
  
       &lt;asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
              DeleteMethod="DeleteMenu" InsertMethod="InsertMenu" SelectMethod="SelectMenu" 
              TypeName="WebPageEditor.editor.MenuSourceManager" UpdateMethod="UpdateMenu"
               &gt;
              &lt;DeleteParameters&gt;
                  &lt;asp:Parameter Name="ID" Type="Int32" /&gt;
              &lt;/DeleteParameters&gt;
              &lt;InsertParameters&gt;
                  &lt;asp:Parameter Name="name" Type="String" /&gt;
                  &lt;asp:Parameter Name="url" Type="String" /&gt;
                  &lt;asp:Parameter Name="order" Type="Int32" /&gt;
              &lt;/InsertParameters&gt;
              &lt;UpdateParameters&gt;
                  &lt;asp:Parameter Name="ID" Type="Int32" /&gt;
                  &lt;asp:Parameter Name="name" Type="String" /&gt;
                  &lt;asp:Parameter Name="url" Type="String" /&gt;
                  &lt;asp:Parameter Name="order" Type="Int32" /&gt;
              &lt;/UpdateParameters&gt;            
          &lt;/asp:ObjectDataSource&gt;
  
          &lt;asp:ReorderList ID="ReorderList1" runat="server" AllowReorder="True" 
              DataSourceID="ObjectDataSource1" PostBackOnReorder="False" 
              ShowInsertItem="True"       SortOrderField="order" DataKeyField="ID" 
              ItemInsertLocation="Beginning"&gt;
  
              &lt;ItemTemplate&gt;
              &lt;div class="menuEditor"&gt;
              &amp;raquo;   &lt;%# Eval("name") %&gt;  
              &lt;asp:LinkButton ID="LinkButton1" runat="server" CommandName="Edit"&gt;LinkButton&lt;/asp:LinkButton&gt;
              &lt;/div&gt;               
              &lt;/ItemTemplate&gt;
  
              &lt;DragHandleTemplate&gt;
                  &lt;img src="ico/moveHandle_ico.gif" 
                  alt='&lt;asp:Literal ID="Literal1" runat="server" Text="&lt;%$ Resources: editorLocalization, ME_moveHandleTT %&gt;" /&gt;'
                  style="cursor:move; width:35px;" /&gt;
              &lt;/DragHandleTemplate&gt;
              &lt;ReorderTemplate&gt;
              &lt;asp:Panel runat="server" /&gt;
  
              &lt;/ReorderTemplate&gt;
  
              &lt;InsertItemTemplate&gt;
                  &lt;asp:Panel ID="panel1" runat="server" DefaultButton="Button1"&gt;
                                    &lt;asp:TextBox ID="TextBox1" runat="server" Text=' &lt;%# Bind("name") %&gt;' ValidationGroup="add" /&gt;
                                      &lt;asp:Button ID="Button1" runat="server" CommandName="Insert" Text="Add"  ValidationGroup="add" /&gt;
                                     &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ValidationGroup="add"
                                          ErrorMessage="Please enter some text" ControlToValidate="TextBox1" /&gt;
                                  &lt;/asp:Panel&gt;
              &lt;/InsertItemTemplate&gt;
  
              &lt;EditItemTemplate&gt;
              &lt;asp:TextBox ID="TextBox2" runat="server" Text='&lt;%# Bind("name") %&gt;' ValidationGroup="edit" /&gt;
                  &lt;asp:TextBox ID="TextBox3" runat="server" Text='&lt;%# Bind("url") %&gt;' ValidationGroup="edit" /&gt;
                       &lt;asp:TextBox ID="TextBox4" runat="server" Text='&lt;%# Bind("order") %&gt;' ValidationGroup="edit" /&gt;
                    &lt;asp:LinkButton ID="LinkButton1" runat="server" CommandName="Update"&gt;LinkButton&lt;/asp:LinkButton&gt;
  
              &lt;/EditItemTemplate&gt;
  
          &lt;/asp:ReorderList&gt;        
  
  
  
      &lt;/ContentTemplate&gt;
      &lt;/asp:UpdatePanel&gt;
  
  
  
  
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>and the code behind</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.UI;
  using System.Web.UI.WebControls;
  using System.IO;
  
  namespace WebPageEditor.editor
  {
  
      public class MenuSourceManager 
      {
          public static List&lt;MenuItem&gt; menuItems;  
  
          #region DataBindMethods
          //[System.ComponentModel.DataObjectMethod(System.ComponentModel.DataObjectMethodType.Select)]
          public List&lt;MenuItem&gt; SelectMenu()
          {            
              return menuItems;  
          }
  
          public void UpdateMenu(int ID, string name, string url, int order)
          {
              menuItems[ID].Name = name;
              menuItems[ID].Url = url;
              menuItems[ID].Order = order;            
          }
  
          public void InsertMenu(string name, string url, int order)
          {
              menuItems.Add(new MenuItem(name, url, order, menuItems.Count));
          }
  
          public void DeleteMenu(int ID)
          {
              menuItems.RemoveAt(ID);
          } 
          #endregion  
      }
  
      public class MenuItem
      {
          public MenuItem(string name, string url, int order, int ID)
          {
              Name = name; Url = url; Order = order; this.ID = ID;
          }
  
          public string Name { get; set; }
          public string Url { get; set; }
          public int Order { get; set; }
          public int ID { get; set; }
      }
  }
  </code></pre>
  
  <p>I load the data to the List collection from the page_load event but that works fine. The data binding works as well. The problem is in that the items cannot be reordered -- during the reordering, the sort value doesn't change and the list doesn't update.</p>