Welcome to Neudesic Blogs Sign in | Join | Help

Drag and drop ASP.NET 2.0 Web Parts in Firefox with Atlas

NOTE: This post has been updated for the beta 2 release of ASP.NET AJAX, see http://blogs.neudesic.com/blogs/david_barkol/archive/2006/11/07/631.aspx


The latest Atlas release brings drag and drop support for ASP.NET 2.0 Web Parts! To add this functionality to your existing pages, do the following:
  1. Copy the "Atlas" run-time assembly (Microsoft.Web.Atlas.dll) from its installation folder to the application's Bin folder.
  2. Copy these elements as children of the <configuration> element:

      <!-- ASP.NET Atlas support-->
      <configSections>
        <sectionGroup name="microsoft.web" type="Microsoft.Web.Configuration.MicrosoftWebSectionGroup">
          <section name="converters" type="Microsoft.Web.Configuration.ConvertersSection"/>
        </sectionGroup>
      </configSections>
     
      <!-- Items required for the Atlas framework -->
      <microsoft.web>
        <converters>
          <add type="Microsoft.Web.Script.Serialization.Converters.DataSetConverter"/>
          <add type="Microsoft.Web.Script.Serialization.Converters.DataRowConverter"/>
          <add type="Microsoft.Web.Script.Serialization.Converters.DataTableConverter"/>
        </converters>
      </microsoft.web>
  3. Copy these elements as children of the <system.web> element:

        <!-- Atlas support -->
        <pages>
          <controls>
            <add namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Atlas" tagPrefix="atlas"/>
            <add namespace="Microsoft.Web.UI.Controls" assembly="Microsoft.Web.Atlas" tagprefix="atlas"/> 
          </controls>
          <tagMapping>
            <add tagType="System.Web.UI.WebControls.WebParts.WebPartManager"
                mappedTagType="Microsoft.Web.UI.Controls.WebParts.WebPartManager"/>
            <add tagType="System.Web.UI.WebControls.WebParts.WebPartZone"
               mappedTagType="Microsoft.Web.UI.Controls.WebParts.WebPartZone"/>
          </tagMapping>
        </pages>
     
        <!-- ASMX is mapped to a new handler so that proxy javascripts can also be served. -->
        <httpHandlers>
          <remove verb="*" path="*.asmx"/>
          <add verb="*" path="*.asmx" type="Microsoft.Web.Services.ScriptHandlerFactory" validate="false"/>
        </httpHandlers>
        <httpModules>
          <add name="ScriptModule" type="Microsoft.Web.Services.ScriptModule"/>
        </httpModules>
  4. Add the Atlas ScriptManager control to the page:

    <atlas:ScriptManager ID="ScriptManager1" runat="server" />

Below is a screen shot of it in action. You might of noticed that the verb menu isn't displayed properly. This might be a bug in the release. I'll try to get to the bottom of it this week.

Lastly, I've updated the demo app from the Southern California Code Camp presentation. You can download it here.

Update: The verb menu in Firefox is a bug that will be fixed in the next Atlas release. Mike Harder has posted a workaround for this release here: http://forums.asp.net/ShowPost.aspx?PostID=1234559

firefox drag and drop

Published Wednesday, March 22, 2006 9:21 AM by David Barkol
Filed Under:

Comments

Anonymous comments are disabled