Problem with databinding in a composite control

  • Thread starter Thread starter Charlie@CBFC
  • Start date Start date
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
 
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
)
 
Back
Top