且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

同一用户控件在页面中多次使用无法正常工作

更新时间:2022-01-21 07:16:41

您必须了解,尽管它们是两个相同的用户控件,但是在呈现它们时,其中所有控件的名称和ID完全不同.的.在您为第一个UC进行更改之前,不会对第二个UC进行任何更改.由于两者都在同一更新面板中,所以这不是问题. Juse同步(使用服务器端的代码)基于触发的UC同步另一个-完成后,它将回传.
You have to understand that though they are two same usercontrol but when they are rendered all the controls inside them have totally different name and ID''s. Making some change in first UC would not make any change in second UC until you write for it. Since both are in same Update Panel, this should not be an issue. Juse sync (using code on server side) the other one based on the triggered UC - once done, it will reflect back.