Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个用户控件,它在运行时动态加载到页面中的选项卡。
usrCtrl = (ControlName)LoadControl("Usercontrols/ControlName.ascx"); usrCtrl.ID = "Name"; tabpanel.Controls.Add(usrCtrl);
我有一个在用户控件中调用的函数display()。我想从它的父页面事件中调用这个用户控件函数。
display()
usrCtrl = (ControlName)LoadControl("Usercontrols/ControlName.ascx"); usrCtrl.ID = "Name"; //call your function here usrCtrl.display();//this will call user control function tabpanel.Controls.Add(usrCtrl);