开发者

ASP.NET Refreshing a user control from another user control

开发者 https://www.devze.com 2023-04-03 11:15 出处:网络
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 th开发者_Go百科e selected value of another user control is selected. Have to use

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 th开发者_Go百科e 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消