Home All Groups Group Topic Archive Search About

Drag 'n Drop support for custom asp.net catalogpart/catalogzone.

Author
25 Feb 2009 11:35 AM
ArnoB
Hi all,

I want to implement drag 'n drop functionality to take a webpart from the
asp.net webpart catalog and add it to the webzone I drop it on. I understand
I shoud inherit some baseclasses and implement some control of my own. Now
i'm looking for some example-code but can't find it anywhere.

I basically want to implement the way webparts are added like in igoogle,
dropthings.com, netvibes.com
Almost every site on internet what uses webparts/gadgets uses this
functionality. I can't believe this doesn't exist for asp.net webparts yet.

I hope someone can provide me with some sample codebits to see how this
should be achieved.

Thanks,

Arno

Author
26 Feb 2009 11:47 AM
lee atkinson
http://www.codeplex.com/dropthings


On 25/02/2009 11:35, in article
5DEBECCB-65EA-46F2-8DC7-3228046A2***@microsoft.com, "ArnoB"
<ArnoB@newsgroup.nospam> wrote:

Show quoteHide quote
> Hi all,
>
> I want to implement drag 'n drop functionality to take a webpart from the
> asp.net webpart catalog and add it to the webzone I drop it on. I understand
> I shoud inherit some baseclasses and implement some control of my own. Now
> i'm looking for some example-code but can't find it anywhere.
>
> I basically want to implement the way webparts are added like in igoogle,
> dropthings.com, netvibes.com
> Almost every site on internet what uses webparts/gadgets uses this
> functionality. I can't believe this doesn't exist for asp.net webparts yet.
>
> I hope someone can provide me with some sample codebits to see how this
> should be achieved.
>
> Thanks,
>
> Arno
>
Author
26 Feb 2009 1:55 PM
ArnoB
Well, dropthings isn't using the asp.net webparts and webparts-catalog, they
build their own framework. It looks pretty good though, but for me it's
useless atm.

I already found some article in the book ASP.NET 2.0 Unleashed, they made a
dragdropwebpartcatalogpart. I implemented this and it works, however... I
run in some problems:

1. When using the ajax scriptmanager and updatepanel, the dag 'n drop is
executed twice. Seems like

if
(!Page.ClientScript.IsClientScriptIncludeRegistered("DragDropCatalogZone"))
{
Page.ClientScript.RegisterClientScriptInclude("DragDropCatalogZone",
Page.ResolveUrl("~/js/DragDropCatalogZone.js"));
Page.ClientScript.RegisterStartupScript(typeof(DragDropCatalogZone),
"DragDropCatalogZone", startupScript, true);
}

should be rewritten for the issue with the updatepanel. I think I've to
register the script at the Ajax scriptmanager, but i'm not sure about this
and how to do this from the inherited CatalogZone class.

2. When using the July 2007 CTP webpartmanager I get the javascript-error:
WebPart_OnDragEnd is not defined. I need this for firefox/safari
compatibility. Seems like my javascript file needs to be updated at some
point.

My test project is here and has a 'Working.aspx' and 'NotWorking.aspx' (the
last one has updatepanel, scriptmanager and CTP WebPartZones and
WebPartManager):
http://www.mediafire.com/?sharekey=51eaeaf8d9f870de36df4e8dca141969e04e75f6e8ebb871

Can somebody help me out with this, if I got it working i'm willin to upload
this for other users reference...

Thanks,

Arno

Show quoteHide quote
"lee atkinson" <leeroy.atkin***@gmail.com> schreef in bericht
news:C5CC31E0.384C%leeroy.atkinson@gmail.com...
> http://www.codeplex.com/dropthings
>
>
> On 25/02/2009 11:35, in article
> 5DEBECCB-65EA-46F2-8DC7-3228046A2***@microsoft.com, "ArnoB"
> <ArnoB@newsgroup.nospam> wrote:
>
>> Hi all,
>>
>> I want to implement drag 'n drop functionality to take a webpart from the
>> asp.net webpart catalog and add it to the webzone I drop it on. I
>> understand
>> I shoud inherit some baseclasses and implement some control of my own.
>> Now
>> i'm looking for some example-code but can't find it anywhere.
>>
>> I basically want to implement the way webparts are added like in igoogle,
>> dropthings.com, netvibes.com
>> Almost every site on internet what uses webparts/gadgets uses this
>> functionality. I can't believe this doesn't exist for asp.net webparts
>> yet.
>>
>> I hope someone can provide me with some sample codebits to see how this
>> should be achieved.
>>
>> Thanks,
>>
>> Arno
>>
>