CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.web_parts_and_personalization Tags:
Item Type: NewsGroup Date Entered: 4/4/2007 3:31:03 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 0 Views: 46 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
1 Items, 1 Pages 1 |< << Go >> >|
manaaron
Asp.Net User
Drag/drop from CatalogZone4/4/2007 3:31:03 AM

0/0

I have created a CatalogPartChrome class and a CatalogZone to override the CreateCatalogPartChrome method and return my CatalogPartChrome class that will render the parts. I try two ways to override RenderCatalogPart.
  • 1.Use AjaxControlToolkit, an error about DragPanelExtender control occured. The description is "DragPanelExtender Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request."

         Are there anyone could help me to fix this error, or any other suggestions about this way? thanks:)

 
  • 2. I want to create a WebPartZone to implement the functionality. My part cannot be added to the zone. Is this way feasible? I need helps from guys who have knowledge about this.

Any suggestions are greately appreciated. My source code as bellow:

public override void RenderCatalogPart(HtmlTextWriter writer,

CatalogPart catalogPart)

{

//base.RenderCatalogPart(writer, catalogPart);

WebPartDescriptionCollection partDescriptions =

catalogPart.GetAvailableWebPartDescriptions();

#if

true

Panel panelContain = new Panel();

panelContain.ID =

"panelContainer";

panelContain.Width =

Unit.Pixel(250);

panelContain.BorderWidth =

Unit.Pixel(2);

panelContain.BorderStyle =

BorderStyle.Solid;

panelContain.BorderColor = System.Drawing.

Color.Black;

panelContain.BackColor = System.Drawing.

Color.Silver;

Panel panelPart;

foreach (WebPartDescription description in partDescriptions)

{

panelPart =

new Panel();

panelPart.ID =

"part" + description.ID.ToString();

panelPart.Attributes.Add(

"style", "width:100%; background-color:#FFF;text-align:left; cursor:move; font-weight:bold;");

Label lblPart = new Label();

lblPart.Text =

"Drag Me--" + description.Title;

lblPart.BackColor = System.Drawing.

Color.PowderBlue;

lblPart.Font.Size =

FontUnit.Small;

lblPart.BorderWidth =

Unit.Pixel(1);

lblPart.BorderStyle =

BorderStyle.Solid;

lblPart.Width =

Unit.Percentage(90);

lblPart.Height =

Unit.Pixel(20);

panelPart.Controls.Add(lblPart);

AjaxControlToolkit.

DragPanelExtender dragPanelExtender = new AjaxControlToolkit.DragPanelExtender();

dragPanelExtender.Page = (System.Web.UI.

Page)System.Web.HttpContext.Current.Handler;

dragPanelExtender.Enabled =

true;

dragPanelExtender.DragHandleID = panelPart.ID;

dragPanelExtender.TargetControlID = panelContain.ID;

panelPart.Controls.Add(dragPanelExtender);

panelContainer.Controls.Add(panelPart);

}

panelContainer.RenderControl(writer);

#endif

#if

false

WebPartZone webpartzone1 = new WebPartZone();

WebPartManager manager1 = WebPartManager.GetCurrentWebPartManager((System.Web.UI.Page)System.Web.HttpContext.Current.Handler);

//((System.Web.UI.Page)System.Web.HttpContext.Current.Handler).Controls.Add(webpartzone1);

int i = 0;

foreach (WebPartDescription description in partDescriptions)

{

WebPartIcon part = new WebPartIcon();

part.Title = description.Title;

manager1.AddWebPart(part, webpartzone1, i);

//manager1.MoveWebPart(part, webpartzone1, i);

i++;

}

writer.Write("<div style='padding-bottom:20px;color:#5377A9;font-family:Arial, Sans-Serif; font-weight:bold;font-size:0.8em;'>Drag part<div>");

webpartzone1.RenderControl(writer);

#endif

}

1 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Beginning Visual C# 2005 Authors: Karli Watson, Christian Nagel, Jacob Hammer Pedersen, Jon D. Reid, Morgan Skinner, Eric White, Pages: 1062, Published: 2006
ASP.NET 2.0 All-In-One Desk Reference For Dummies: all-in-one desk reference for dummies Authors: Doug Lowe, Jeff Cogswell, Ken Cox, Pages: 910, Published: 2006
ASP.NET 2.0: A Developer's Notebook Authors: Wei Meng Lee, Pages: 326, Published: 2005
Professional Web Parts and Custom Controls with ASP.NET 2.0 Authors: Peter Vogel, Pages: 449, Published: 2005
Professional C# 2005 with .NET 3.0 Authors: Christian Nagel, Bill Evjen, Jay Glynn, Karli Watson, Morgan Skinner, Pages: 1748, Published: 2007
ASP.NET 2.0 Black Book: black book Authors: Dreamtech Software, Dreamtech Software, Charul Shukla, Anil Kumar Barnwal, Dreamtech Software India, Pages: 1167, Published: 2006
Professional ASP.NET 2.0 Authors: Bill Evjen, Scott Hanselman, Farhan Muhammad, Srinivasa Sivakumar, Devin Rader, Pages: 1253, Published: 2005
Pro ASP.NET 2.0 Website Programming Authors: Damon Armstrong, Pages: 641, Published: 2005
Pro ASP.NET 2.0 in VB 2005: From Professional to Expert Authors: Laurence Moroney, Matthew MacDonald, Pages: 1253, Published: 2006
Professional ASP.NET 3.5: In C# and VB Authors: Bill Evjen, Scott Hanselman, Devin Rader, Pages: 1673, Published: 2008

Web:
Drag/drop from CatalogZone - ASP.NET Forums The CatalogZone and WebPartZone shipping in Whidbey will not support drag and drop from the Catalog, but it is being considered for a future ...
Drag/drop from CatalogZone - ASP.NET Forums Drag/drop from CatalogZone. Last post 04-03-2007 11:31 PM by manaaron. 0 replies . Sort Posts:. Oldest to newest, Newest to oldest ...
Customising the CatalogZone class Re: Customising the CatalogZone class ... list of all web parts on the right hand pane and then drag and drop them ... Rather than using the default ...
Wabpart Drag N Drop with Catalog Zone in ASP 2.0 Talk about Wabpart Drag N Drop with Catalog Zone in ASP 2.0.
Customising the CatalogZone class Could the custom CatalogZone not simply call the Render methods of each contained web parts. However how would you handle the drag and drop ...
Building Web Parts, Part 3 | O'Reilly Media Jun 27, 2005 ... Drag and drop a CatalogZone control from the WebParts tab of the Toolbox onto the form (see Figure 2). The CatalogZone control is the ...
CodeProject: Display a DropDownList in a CatalogZone. Free source ... Oct 12, 2005 ... I'd like to drag objects from the catalog zone, and drop into other WebPart Zones. How can this be accomplished? (www.netvibes.com has done ...
Dynamically Adding Custom User Controls to a Web Part Catalog Zone ... It displays a catalog zone (not shown on the figure as the page is currently ... don't worry, it's all available as a drag drop feature in your toolbox in ...
WebPart Framework basics Aug 17, 2007 ... Go to design view of your webpage. Drag and drop CatalogZone control in thrid cell (blue) . Now drag and drop DeclarativeCatalogPart. ...
ASP.NET 2.0: WebPart Framework Basics Drop a CatalogZone. Inside the CatalogZone, create a ZoneTemplate and drop a ... Not only that, you can drag and drop the WebPart from WebPartZone1 to ...




Search This Site:










access denied error for admin

dotnetnuke module features, feedback needed

how to set navigationurl for treeview dynamically?

rich text control

it has been a real pleasure to meet dotnetnuke team at pdc last night

installation error: object reference not set to an instance of an object.

how to manage: one host, multiple domains on godaddy.com?

dnn and xp not working!? pls help

flex search module

problem with vs 2005: quick find ctrl + f, quick replace ctrl + h, etc.

uploading skins & containers

vwd express login tools (database requirement)

developing social network! want in ?

unable to edit content page in design view

moving install to virtual directory

custom membership provider

after login

ttt gallery for dnn 1.0.10 error creating new directories

does anyone know how to solve this problem? failed to generate a user instance of sql server due to a failure in starting the process for the user instance. the connection will be closed.

where to put this image?

deletion of a portal

quickbooks experience? anyone?

bug posting

customizing portal starter kit

dynamic forms authentication

from view inserts the value of the last inserting at page reload a second time

formsauthentication: how to programatically check if allowed/denied?

what mean by green line

araxis merge - folder compare diff report 2.03 ---> 2.04

reference controls in masterpage from class in app_code

 
All Times Are GMT