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

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 !
 
J

John Saunders

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.
 

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,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top