开发者

Communicating between controls in a Webpart

开发者 https://www.devze.com 2022-12-17 08:50 出处:网络
We have a webpart that has 2 user controls. We want the second user control to be able to read a value from the first user control.

We have a webpart that has 2 user controls.

We want the second user control to be able to read a value from the first user control.

开发者_高级运维

One solution we have considered is an event in the first control, that updates a value in second user control. But not sure where to place / hook up the events so that this works.

Anyone have any idea how this can be done.


This would be the solution I would consider as well. The page/control where you have your Control1 must listen to the event of Control 1. If the event is raised, you perform the update method of control2 in the eventhandler of the page/control

0

精彩评论

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