You are developing a Web control. The Web control captures user address information in a Web application. You create a class named AddressControl that inherits from CompositeControl. This control consists of child controls. You need to ensure that the child controls are properly output to the browser. Developers using your control must be able to set the appropriate text for labels. In addition, they must be able to pull user address information from the associated text boxes during postback. What should you do? ()
- A、Override the EnsureChildControls method of the base class. Add the child controls to the base container.
- B、Override the CreateControlCollection method of the base class. Add the child controls to the ControlCollection class.
- C、Override the CreateChildControls method of the base class. Add the child controls to the base container.
- D、Override the DataBindChildren method of the base class. Add the child controls to the ControlCollection class.
正确答案:C
答案解析:有
![](/editor/images/201705/qrcode_for_gh_573e2a458573_258.jpg)
微信扫一扫手机做题