Problem with databinding in a composite control

C

Charlie@CBFC

Hi:

I'm creating some composite custom server controls that combine user
interface element and a validation control. One such control combines a
dropdownlist and required field validator. The problem is when I want to
use it on a form, how do I get a reference to the dropdownlist contained
within the control to call databind method? Also, if I call databind within
server control, it works but viewstate doesn't work. Does any know of any
example of how to do this?

Thanks,
Charlie
 
T

Teemu Keiski

Hi,

you would need to expose the DDL out as a property (or then expose certain
strategic properties like DataSource out from the control, and override
DataBind method, and call straight that of your composite control when
databinding
)
 

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

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top