Welcome to MSDN Blogs Sign in | Join | Help

Mike Harder's Blog

ASP.NET and ASP.NET AJAX
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: http://forums.asp.net/thread/1545256.aspx.

Posted: Tuesday, January 23, 2007 10:12 PM by mharder

Comments

khyati said:

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

# February 2, 2007 4:52 AM

mharder said:

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

# February 21, 2007 3:15 PM

Dennes said:

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

# February 23, 2007 7:58 PM

Fcerqueira said:

Dizem que alguns de meus posts são mitos...rs.rs vamos comecar com alguns FATOS e perguntas que...

# March 28, 2007 1:27 AM

Next Step Place said:

Posso usar webparts com ajax ?Minha resposta SIM.Para usar webparts com ajax não preciso fazer...

# March 28, 2007 11:25 AM

dilippillai said:

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

# February 14, 2008 12:00 PM

bbossche said:

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

# March 5, 2008 7:43 AM

nura_mca said:

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.

# June 2, 2008 6:17 AM
Anonymous comments are disabled
Page view tracker