Dynamic User Control

B

Brian Shannon

I created a composite control that consist of a html input, drop down, and
RadioButtonList.

I want the radioButtonList set with autopostback = true

When I set this to true I have a javascript error on the page. I wrote no
javascript myself.

Would this have something to do with controls needing to be created on every
postback? I am not too familiar with that but have been reading up on it.

Currently I reload my composite control on every postback in the page_load
event. The page will render but on the slectedindexchanged event of the
radiobuttonlist does not fire.

Can someone please explain how to wire everything up correctly.

I have read on CreateChildControls, EnsureChildControls but don't quite
understand there use.

Any idea's

Thanks
 
B

Ben Lovell

Hi,

Are you creating your controls in the CreateChildControls method? Does you
control's Controls property contain the EnsureChildControls() call?
 
B

Brian Shannon

I am not dynamically creating any individual controls. I am only
dynamically loading a composite control.

Thanks
 

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

Top