What should you do o add the CKGrid control to the Visual Studio .NET toolbox?

You have developed a custom control named CKGrid and that will be used in the redevelopment of Domain.com’s e-Commerce Web site. You want to add the CKGrid control to the Visual Studio .NET toolbox so that it can be dragged onto a Web Forms page.
What should you do?

You have developed a custom control named CKGrid and that will be used in the redevelopment of Domain.com’s e-Commerce Web site. You want to add the CKGrid control to the Visual Studio .NET toolbox so that it can be dragged onto a Web Forms page.
What should you do?

A.
Create the CKGrid control as a Web Control Library.
Within the Visual Studio .NET toolbox, click Choose Items.
Then browse to CKGrid.dll and select it.

B.
Create the CKGrid control as a User Control.
Within the Visual Studio .NET toolbox, click Choose Items.
Then browse to CKGrid.ascx and select it.

C.
Create the CKGrid control as a Web Control Library.
Right-click Web Project, click Add Reference.
Then browse to CKGrid.dll and select it.

D.
Create the CKGrid control as a User Control.
Right-click Web Project, click Add Reference.
Then browse to CKGrid.ascx and select it.

Explanation:
The web server control must be compiled as a Web Control Library. This will create a DLL file. You must then add the DLL file to the Visual Studio .NET toolbox. To accomplish this, you must click on Choose Items in the Visual Studio .NET toolbox and select the DLL.

Incorrect Answers:
B: The web server control must be compiled as a Web Control Library, not as a User Control. User controls cannot be added to the Visual Studio .NET toolbox. Furthermore, adding a reference to the Web Project will not add the control to the Visual Studio .NET toolbox.
C: The web server control must be compiled as a Web Control Library. This will create a DLL file. You must then add the DLL file to the Visual Studio .NET toolbox. To accomplish this, you must click on Choose Items in the Visual Studio .NET toolbox and select the DLL. Adding a reference to the Web Project will not add the control to the Visual Studio .NET toolbox.
D: The web server control must be compiled as a Web Control Library, not as a User Control. User controls cannot be added to the Visual Studio .NET toolbox.



Leave a Reply 0

Your email address will not be published. Required fields are marked *