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

A

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
 
A

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top