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: 2/22/2005 3:20:46 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 18 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
mrbuzzcut
Asp.Net User
When does a CatalogPart actually get a reference to its WebPartmanager?2/22/2005 3:20:46 PM

0/0

A requirement of a current portal project is for a User to click an "Add Content" link on a Page and have a pop-up form offer him a Catalog of available WebParts (I tried to point out, to no avail, that the Catalog could be nicely placed at the top of the Page and shown/hidden easily but ...)

Anyhooo ... my new plan is to retrieve a list of available Zones from the WebPartManager and Parts from the various CatalogParts, place them in javascript variables and eventually pass them to the pop-up form to be cobbled into a checkbox group of Parts and a dropdown of available zones ...

I am able to get the Zones from the WebPartManager as early as Page_Init. I can retrieve the collection of CatalogParts from my CatalogZone. But when I attempt to iterate through each CatalogPart, calling GetAvailableWebPartDescriptions, I am running into a problem.

This CatalogPart is one I built that iterates through a specific directory looking for .WebPart files then using WebPartManager.ImportWebPart. This works great after the Page has been loaded and I click a button to Add Content and change the DisplayMode to CatalogDisplayMode.

However, at this point (Page_Init, first time through) in the lifetime of the Page, the WebPartManager property of the CatalogPart is coming back null, even if I set DisplayMode to CatalogDisplayMode.

When does a CatalogPart actually get a reference to its WebPartmanager?

Thanks!
mrbuzzcut
Asp.Net User
Re: When does a CatalogPart actually get a reference to its WebPartmanager?2/22/2005 6:00:07 PM

0/0

Update:

I tried creating a WebPartManager object, setting it's DisplayMode to Catalog and calling it's ImportWebPart method and I get the following exception:

The specified display mode is not supported on this page. Make sure personalization is enabled and the corresponding zones are present on the page. The display mode can be set during and after Page_Init [I have done this].
Parameter name: value
mharder
Asp.Net User
Re: When does a CatalogPart actually get a reference to its WebPartmanager?3/1/2005 8:13:33 PM

0/0

To answer your first question, currently the CatalogPart gets a reference to its CatalogZoneBase and WebPartManager in CatalogZoneBase.CreateChildControls(). The CatalogZoneBase.CatalogParts property getter calls EnsureChildControls(). So, the reference to the CatalogZoneBase and WebPartManager should be called the first time the CatalogZoneBase Controls property or CatalogParts property is accessed.

For your second question, to set the DisplayMode to Catalog the following conditions must be true: Personalization is enabled, an authenticated user is browsing the page, and the page must contain a CatalogZoneBase. Are all of these true? If so, please post a repro.
http://blogs.msdn.com/mharder

This posting is provided "AS IS" with no warranties, and confers no rights.
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
When does a CatalogPart actually get a reference to its ... When does a CatalogPart actually get a reference to its WebPartmanager? Last post 03-01-2005 3:13 PM by mharder. 2 replies. Sort Posts: ...
CatalogZoneBase Class (System.Web.UI.WebControls.WebParts) In contrast, if your custom zone and its CatalogPart controls are going to be ... Dim _manager As WebPartManager Sub Page_Init(ByVal sender As Object, ...
PageCatalogPart Class (System.Web.UI.WebControls.WebParts) JScript. public final class PageCatalogPart extends CatalogPart ...




Search This Site:










"name" attribute in <a> tag is outdated? what can replace it?

my new resourcedirectory module ( online samples )

web parts for marketing department!?

any idea when 3.x will be ga?

is there a dnn2 classifieds module?

seo search engine dnn options & modules

developing portal system question

move dnn 3.1 site

banner module redirect

encrypting a password

how to do this?

dnn & blog websites

debugger hangs

imc - communicating between tabs

life after master pages 101

i want membership.deleteuser(object userproviderkey)

pws randomizer

defaultbutton for panel? webform uses masterpage.

transactional deployment? is-it possible?

cannot get the masterpage contentplaceholder to change size.

server error problem

forum/blog, documents and email notifications

dnn 2.1.2 not collecting sitelog events, not expiring portals

impersonation & directory.exists

udf error--help

how to log out

login control

listing of free dnn modules

page denies authenticated users access

windows authentication problems

 
All Times Are GMT