By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,854 Members | 1,871 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,854 IT Pros & Developers. It's quick & easy.

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

P: n/a
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

Aug 28 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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

"ra*************@gmail.com" wrote:
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

Aug 28 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.