简体   繁体   中英

ASP.NET Refreshing a user control from another user control

I'm working on an ASP.NET project using C# and I'm trying to refresh the data in a dropdown in one user control, when the selected value of another user control is selected. Have to use 3rd party Telerik controls. Everything is Ajax'd (again Telerik) so it should just be a matter of refreshing the ajax panel, but This doesn't seem to be possible with the Telerik Ajax panels. Any other ideas on a way to do it?

Another option would be a way of doing the same thing from the page the user controls are in on a button click (as there is a button to unhide the user control, which could also be used to refresh it.)

Thanks in advance for the advice.

You should be able to use the RadAjaxManager in this case. This will allow you to, either via the built-in configuration tool or programatically, set up certain controls to update other controls on any kind of postback. The easiest way in this case would be to have the RadAjaxManager on your main page (hosting the two user controls) and have the UserControls be loaded in panels. Then set, in the AjaxSettings of the RadAjaxManager, that one panel will cause a partial postback in the other.

The linked demo should give some insight to this, as will the documentation .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM