单项选择题
You develop a Web control. The Web control consists of labels and associated text boxes.You need to ensure that the Web control has both toolbox and visual designer support. What should you do?()
A. Add a Web Control Library project to your solution. Define a class that inherits from CompositeControl.
B. Add a Windows Control Library project to your solution. Define a class that inherits from UserControl.
C. Add a Web User Control to your project. Define a class that inherits from UserControl.
D. Add a Mobile Web User Control to your project. Define a class that inherits from MobileUserControl.
相关考题
-
单项选择题
You are creating a custom control. The UI of the control must contain several text boxes and two buttons. The control must be available in the global assembly cache for reuse across multiple Web applications. You need to achieve this functionality by using the minimum amount of code. What should you do? ()
A. Create a control that derives from System.Web.UI.Control.
B. Create a control that derives from System.Web.UI.WebControls.CompositeControl.
C. Create a control that derives from System.Web.UI.WebControls.WebControl.
D. Create a control that derives from System.Web.UI.UserControl. -
单项选择题
You create a Web server control named ContosoControls. You add a Web custom control named ContosoMailer to it. You then distribute the Web Control Library files to your team. You need to provide your team with the correct procedure for adding the Web Control Library to the items in the toolbox of Microsoft Visual Studio .NET. Which procedure should you provide to the team?()
A. Within the toolbox, click Choose Items and then browse to and select the ContosoControls user control.
B. Within the toolbox, click Choose Items and then browse to and select the ContosoMailer user control.
C. Right-click Web Project, click Add Reference, and then browse to and select the ContosoControls.dll file.
D. Within the toolbox, click Choose Items and then browse to and select the ContosoControls.dll file. -
单项选择题
You create a Web Form with several UI elements on it. During a code review, you realize that some of the UI elements can be grouped into user controls. You need to create a Web control to group the UI elements that do not require server-side processing. Doing so will enable you to programmatically add or remove the UI elements from the page. You want to maintain the UI elements style properties. What should you do? ()
A. Use System.Web.UI.TemplateControl to group the UI elements.
B. Use System.Web.UI.HtmlControls.HtmlControl to group the UI elements.
C. Use System.Web.UI.LiteralControl to group the UI elements.
D. Use System.Web.UI.WebControls.Literal to group the UI elements.
