搜题
用户您好, 请在下方输入框内搜索其它题目:
搜题
题目内容 (请给出正确答案)
提问人:网友 发布时间:
【多选题】

You&#8194;use&#8194;the&#8194;following&#8194;declaration&#8194;to&#8194;add&#8194;a&#8194;Web&#8194;user&#8194;control&#8194;named&#8194;TestUserControl.ascx&#8194;to&#8194;an&#8194;ASP.NET&#8194;page&#8194;named&#8194;TestPage.aspx.&#8194;&#8194;<uc:TestUserControl&#8194;ID="testControl"&#8194;runat="server"/>&#8194;&#8194;You&#8194;add&#8194;the&#8194;following&#8194;code&#8194;to&#8194;the&#8194;code-behind&#8194;file&#8194;of&#8194;TestPage.aspx.&#8194;&#8194;private&#8194;void&#8194;TestMethod(){&#8194;...}You&#8194;define&#8194;the&#8194;following&#8194;delegate.&#8194;&#8194;public&#8194;delegate&#8194;void&#8194;MyEventHandler();&#8194;&#8194;You&#8194;need&#8194;to&#8194;add&#8194;an&#8194;event&#8194;of&#8194;type&#8194;MyEventHandler&#8194;named&#8194;MyEvent&#8194;to&#8194;TestUserControl.ascx&#8194;and&#8194;attach&#8194;the&#8194;page’s&#8194;TestMethod&#8194;method&#8194;to&#8194;the&#8194;event.&#8194;Which&#8194;two&#8194;actions&#8194;should&#8194;you&#8194;perform?(

A、Add the following line of code to TestUserControl.ascx.cs. public event MyEventHandler MyEvent;

B、Add the following line of code to TestUserControl.ascx.cs. public MyEventHandler MyEvent;

C、Replace the TestUserControl.ascx reference in TestPage.aspx with the following declaration. <uc:TestUserControl ID="testControl" runat="server" OnMyEvent="TestMethod"/>

D、Replace the TestUserControl.ascx reference in TestPage.aspx with the following declaration. <uc:TestUserControl ID="testControl" runat="server" MyEvent="TestMethod"/>

更多“You&#8194;use&#8194;the&#8194;following&#8194;declaration&#8194;to&#8194;add&#8194;a&#8194;Web&#8194;user&#8194;control&#8194;named&#8194;TestUserControl.ascx&#8194;to&#8194;an&#8194;ASP.NET&#8194;page&#8194;named&#8194;TestPage.aspx.&#8194;&#8194;<uc:TestUserControl&#8194;ID="testControl"&#8194;runat="server"/>&#8194;&#8194;You&#8194;add&#8194;the&#8194;following&#8194;code&#8194;to&#8194;the&#8194;code-behind&#8194;file&#8194;of&#8194;TestPage.aspx.&#8194;&#8194;private&#8194;void&#8194;TestMethod(){&#8194;...}You&#8194;define&#8194;the&#8194;following&#8194;delegate.&#8194;&#8194;public&#8194;delegate&#8194;void&#8194;MyEventHandler();&#8194;&#8194;You&#8194;need&#8194;to&#8194;add&#8194;an&#8194;event&#8194;of&#8194;type&#8194;MyEventHandler&#8194;named&#8194;MyEvent&#8194;to&#8194;TestUserControl.ascx&#8194;and&#8194;attach&#8194;the&#8194;page’s&#8194;TestMethod&#8194;method&#8194;to&#8194;the&#8194;event.&#8194;Which&#8194;two&#8194;actions&#8194;should&#8194;you&#8194;perform?(”相关的问题
客服
TOP

请使用微信扫码支付

订单号:
遇到问题请联系在线客服