Problem with ObjectDataSource and custom webcontrol.

P

Peter Rilling

Okay, I something weird is happening where I do not know if I am doing
something wrong.

I have a page that contains a custom webcontrol that I developed. This
webcontrol basically loads a UserControl (ascx) using the LoadControl method
and writing it out to the browser.

Page --> custom webcontrol --> usercontrol (via LoadControl) --> stream to
browser.

On the usercontrol, I am using an ObjectDataSource where I have some methods
and objects that this datasource uses. When I view the page based on the
above scenario nothing appears.

However, when I take the above usercontrol and place it directly on a page.
The contents renders fine. My "select" method is being invoked and
everything.

The only difference between the two ways is that the first way uses a
webcontrol as an intermediary which dynamically loads the usercontrol.
Would that cause problems with the use of the ObjectDataSource?
 
P

Peter Rilling

Actually, it might just be a general problem with the LoadControl method.
It does not appear that any code is executing. I cannot debug into the
usercontrol and even if I throw an exception in the Page_Load, nothing
happens. Any ideas?
 

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,994
Messages
2,570,223
Members
46,814
Latest member
SpicetreeDigital

Latest Threads

Top