This is a practice problem for Microsoft Certificate Exam 70-515(ASP.NET 4) from Measure Up.
I am not sure the meaning of “Options property” here.
I know the answer but my question is what is “Options property”?
You are using the .NET Framework 4 and Visual Studio 2010 to create a server control.
When the server control is added to a Web Form from the Visual Studio toolbox, you want to ensure that the following markup is added to the page:
<uc:MyControl ID="MyControl1" runat="server" BackColor="beige" ForeColor="black" />
You also want to ensure that when the control is selected on the Web Form, the Options property is displayed.
What should you do?
- Decorate the class with the ToolboxData attribute and the Options property with the DefaultProperty attribute.
- Decorate the class with the ToolboxItem attribute and the DefaultProperty attribute.
- Decorate the class with the ToolboxItem attribute and the Options property with the DefaultProperty attribute.
- Decorate the class with the ToolboxData attribute and the DefaultProperty attribute.
A property called “Options” which is (all of the below):