WebParts: Nested UserControls

A

Aaron C. Roberts

Hi there:

I am working with ASP.NET 2.0 and I've implemented a WebPartPanel control to
server as a wrapper for my WebPart enabled site. The wrapper has a custom
omplementation of the HelpVerb that reads data from an XML file and adds a
div to the top or bottom of the WebPart (as opposed to Navigating away or
replacing the part on the page). The wrapper works fine...so I think.

Inside this control I have attempted to place a UserControl I've written
that has a few DropDownLists which bind to my ObjectDataSource(s) to
retrieve data. Selection 1 drives 2, which drives 3, and then 4 (typical
multi-stage select senario).

If I place the UserControl on the page, it will as expected, work just fine,
but it will be wrapped in the GenericWebPart control and not have any help.
If I place it in my WebPartPanel it seems to crap out on the databinding. I
will bind the first DropDownList to my ObjectDataSource but on postback it
never does, and therefore breaks some of the conditional display / hide /
property setting that takes place in Page_PreRender.

I have tracked the issue down to a problem with ViewState and the Control
Tree insidethe WebPartPanel but I'm unclear as to what the problem is. One
thing I have identified is that the Page LifeCycle is NOT doing what I would
expect. It seems to be incosistantly binding data at different points in
the cycle.

Any help with this would be greatly appriciated. I've been trying to track
down the problem for a day and a half now with little to no progress.
[Maybe this is a lesson not to be using such new technologies =:), but I
absolutley love the rich environment that Atlas and WebParts will provide me.
...should I get things working ]

I'd be more than happy to provide sample code.

Desperate Developer,
Aaron C. Roberts
 

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,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top