Webparts with Atlas vs MagicAjax

Try this.

  <asp:WebPartManager ID="WebPartManager1" runat="server">
            </asp:WebPartManager>
            <ajax:AjaxPanel ID="AjaxPanel1" runat="server" Height="305px" Width="452px">
            <wmz:WebPartDisplayModesMenu ID="WebPartDisplayModesMenu1" runat="server" />
            <table style="width: 505px">
                <tr>
                    <td>
                        <asp:WebPartZone ID="WebPartZone1" runat="server">
                            <ZoneTemplate>
                                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                            </ZoneTemplate>
                        </asp:WebPartZone>
                    </td>
                    <td style="width: 280px">
                        <asp:WebPartZone ID="WebPartZone2" runat="server">
                            <ZoneTemplate>
                                <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>
                            </ZoneTemplate>
                        </asp:WebPartZone>
                    </td>
                </tr>
            </table>
        </ajax:AjaxPanel>

I've just placed a couple of WebPartZone controls in a MagicAjax's AjaxPanel. In each WebPartZone I placed a normal server control, just to try moving webparts from WebPartZone to another. The WebPartDisplayModesMenu  is a custom control that I use to change the display modes of the webparts, you can download it from here. Run the page and try. It works perfectly (webparts with ajax support, that's what I was looking for when I first heard about webparts in ASP.NET 2.0. Nice stuff!!)

Now lets try the same thing, but this time, with the Atlas UpdatePanel control.

          <atlas:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="True">
        </atlas:ScriptManager>
        <asp:WebPartManager ID="WebPartManager1" runat="server">
        </asp:WebPartManager>
         <atlas:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                &nbsp;<wmz:WebPartDisplayModesMenu ID="WebPartDisplayModesMenu1" runat="server" />
                <table style="width: 505px">
                    <tr>
                        <td>
                            <asp:WebPartZone ID="WebPartZone1" runat="server">
                                <ZoneTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                                </ZoneTemplate>
                            </asp:WebPartZone>
                        </td>
                        <td style="width: 280px">
                            <asp:WebPartZone ID="WebPartZone2" runat="server">
                                <ZoneTemplate>
                                    <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>
                                </ZoneTemplate>
                            </asp:WebPartZone>
                        </td>
                    </tr>
                </table>
       
            </ContentTemplate>
        </atlas:UpdatePanel>

Changing the mode from Browse to Design works fine. But try moving a webpart from one zone to another, you will not be able to. The verbs menu will not work too.

Strange???

Published Tuesday, December 27, 2005 10:43 AM by admin
Filed Under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Webparts with Atlas vs MagicAjax @ Saturday, February 04, 2006 3:57 PM

It seems that we need to refresh the destination UpdatePanel just after drop the webpart into one.
There is a "Trigger" section in the UpdatePanel. And it seems that we need to create a ControlEventTrigger which will refresh our panel when the webpart will have been droped, isn't it?
But I don't know which event should we use :)

Alexey Raga

# re: Webparts with Atlas vs MagicAjax @ Sunday, February 05, 2006 2:08 AM

Not sure, I haven't tried every thing. But you can see from Scott Guthrie's post that not all webpart scenarios are supported by the current build of Atlas

http://weblogs.asp.net/scottgu/archive/2006/01/20/436034.aspx

admin

What do you think?

(required) 
required 
optional
required