Populate data in one user control based on selection in another user control

R

rajarameshvarma

Hi,

I have two user controls in an asp.net webpage each contains a
DropDownList. Depending on the selection of the drop down in one user
control i need to populate data in the other drop down which is in
another usercontrol in the same page. Autopostback property for the
first dropsown is set to true.

please anybody can help me in this regard .

Thanking you,
Raja Ramesh Varma
 
G

Guest

Hi

Kindly post this asp.net question in the relevant DG.

However, the solution for your question would be,

1. Create one property in the other usercontrol, which needs to be
populated. This property should accept a datatable. In the property get, try
to assign this as the datasource and do a data bind to the drop down.

2. Since you have the autopostback to true, once you come to the server,
pull the data you need to bind in a data table. Assign it to the property,
you created in the user control.

Hope this helps. Let me know, if you want more info.

Prem
 

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