Something about User Control,... wait online... thank you

  • Thread starter Thread starter Edward
  • Start date Start date
E

Edward

hi,

I've one page , which contains two user controls' instance,

A is a dropdownlistbox ( because it has some complex load code, I sealed it
into an ascx),
B is information of one db record.

how can I make B retrives data from DB according to A's dropdownlistbox
SelectionChanged Event ?

thanks a lot !
 
Edward said:
hi,

I've one page , which contains two user controls' instance,

A is a dropdownlistbox ( because it has some complex load code, I sealed it
into an ascx),
B is information of one db record.

how can I make B retrives data from DB according to A's dropdownlistbox
SelectionChanged Event ?

You could declare a public event in A and raise it within the
SelectionChanged handler in A. You would also want to declare a property in
A which returns the value of the selection from the dropdownlist.

You could declare a property in B which can be set with the key of the data
to retrieve.

The page would then handle the event from A and set the property in B with
the value of the property in A.
 
Back
Top