How to expose the incidents of child controls in user controls

xiaoxiao2021-03-06  82

Q: **** How to expose the incident of child control in user control **** Main Solution: Saucer Author: Redbb Thank: GREPL, HAOLIQI, Saucer, WebDiyer review: ACEWANG Community Correspondence Post: View A: I have customized a user control (.ascx), which contains a Button, I want the control of the controller to customize the handler of the Button's Click event, so you need to retain this event to the user. How to expose. I am At the time, there is always a prompt class is not instantiated. Because .ascx is Abstract Class. Thank you !! ----------------------------- ---------------------------------- Public Event System.EventHandler MyClick; this.button.click = new system. EventHandler (INTERNALCLICK); Private Void InternalClick (Object Sender, System.EventArgs E) {if (MyClick! = Null) MyClick (Sender, E);

转载请注明原文地址:https://www.9cbs.com/read-120838.html

New Post(0)