다음을 통해 공유


WebParts and ASP.NET AJAX 1.0

A lot of people ask how to use WebParts with ASP.NET AJAX 1.0.  There are three different WebParts features:

  1. Cross-browser drag and drop.
  2. Modify WebParts page (drag and drop, minimize, restore, close, add, delete) without postback.
  3. Update contents of WebPart without postback.

Cross-browser drag and drop is enabled by using the WebParts controls in the AJAX Futures CTP.

Modifying a WebParts page without postback is implemented by wrapping the WebPartManager and WebPartZones in an UpdatePanel.  This was partially working in the July CTP, but it does not work and is not supported in ASP.NET AJAX 1.0.  It may be supported in Orcas.

Updating the contents of a WebPart without postback is implemented by placing an UpdatePanel inside a WebPart.  This is supported in the core ASP.NET AJAX Extensions 1.0.  It should work with either the ASP.NET 2.0 WebParts controls, or the AJAX Futures CTP versions of the WebParts controls.

Hope this helps.  I've also posted this to the ASP.NET Forums: https://forums.asp.net/thread/1545256.aspx.

Comments

  • Anonymous
    February 01, 2007
    Hi Mike, I am facing problem when I use updatepanel inside a webpart. My hierarchy is something like this: <asp:WebPartZone><ZoneTemplate> <asp:label> <UpdatePanel><ContentTemplate/>some controls <UpdatePanel/> <UpdatePanel><ContentTemplate/>some controls <UpdatePanel/></ZoneTemplate> </asp:WebPartZone> To my surprise, when I run this cpde, I see 3 webparts on the page. But If a include one more updatepanel immediately after ZoneTemplate, it works fine. Please help. Khyati

  • Anonymous
    February 21, 2007
    Re: Khyati It looks like your WebPartZone contains 3 controls: 1 Label and 2 UpdatePanels.  So I would expect to see 3 WebParts rendered on the page. -Mike

  • Anonymous
    February 23, 2007
    Se a história dos validadores estava mal documentada, as webParts então, nem se fala. Elas estão...

  • Anonymous
    March 27, 2007
    The comment has been removed

  • Anonymous
    March 28, 2007
    Posso usar webparts com ajax ?Minha resposta SIM.Para usar webparts com ajax não preciso fazer...

  • Anonymous
    February 14, 2008
    Hi Mike, I have a custom webpart implementation and am trying to programmatically add a updatepanel inside the webpart. Could you post some code sample illustrating how I can do that. Thanks in advance. Dilip

  • Anonymous
    March 04, 2008
    Hi Mike, Can you provide an update re: cross browser drag & drop in .NET 3.5? I have seen several posts that convey that it was working in interim test versions, but it seems to have been dropped from the final .NET 3.5 framework. Thanks for your help, Brian

  • Anonymous
    June 01, 2008
    Hi Mike, I saw your post in asp forums in the below link: http://forums.asp.net/p/1021984/1384660.aspx I too have the same issue as specified in that thread, i have nested atlas update panels and one for controlling the drag and drop filcker and the other for controlling the webpart alone (i.e.) to update itself and not to disturb other webparts on autorefresh. As discussed in that thread, when i drag my webpart from one zone to another, i see multiple instances of my web part blured.  Please let me know whether there is any change in Atlas to incorporate the nested update panels.