YouusethefollowingdeclarationtoaddaWebusercontrolnamedTestUserControl.ascxtoanASP.NETpagen
YouusethefollowingdeclarationtoaddaWebusercontrolnamedTestUserControl.ascxtoanASP.NETpagenamedTestPage.aspx.Youaddthefollowingcodetothecode-behindfileofTestPage.aspx.privatevoidTestMethod(){...}Youdefinethefollowingdelegate.publicdelegatevoidMyEventHandler();YouneedtoaddaneventoftypeMyEventHandlernamedMyEventtoTestUserControl.ascxandattachthepage’sTestMethodmethodtotheevent.Whichtwoactionsshouldyouperform?()
A.AddthefollowinglineofcodetoTestUserControl.ascx.cs.publiceventMyEventHandlerMyEvent;
B.AddthefollowinglineofcodetoTestUserControl.ascx.cs.publicMyEventHandlerMyEvent;
C.ReplacetheTestUserControl.ascxreferenceinTestPage.aspxwiththefollowingdeclaration. <uc:TestUserControlID="testControl"runat="server"OnMyEvent="TestMethod"/>
D.ReplacetheTestUserControl.ascxreferenceinTestPage.aspxwiththefollowingdeclaration. <uc:TestUserControlID="testControl"runat="server"MyEvent="TestMethod"/>