70-573 · Question #51
You are running a default installation of Microsoft Visual Studio 2010. You have a user control named Control.ascx. You need to convert the user control to a Web Part that will be hosted in a…
The correct answer is A. Create a new Web Part and reuse the code from the existing MyControl.ascx file. MNEMONIC RULE: "Create a new Web Part" Since you already have a user control, you don't need to create a Visual Web Part (by dragging- and-dropping user controls from the Toolbox).
Question
You are running a default installation of Microsoft Visual Studio 2010. You have a user control named Control.ascx. You need to convert the user control to a Web Part that will be hosted in a Microsoft SharePoint Server 2010 farm. The Web Part must be packaged as a sandboxed solution. What should you do?
Options
- ACreate a new Web Part and reuse the code from the existing MyControl.ascx file.
- BImport the user control into a new Visual Web Part and use the existing MyControl.ascx file.
- CModify the SafeControls section of the web.config file.
- DCopy the Control.ascx file to the ControlTemplates folder.
How the community answered
(40 responses)- A83% (33)
- B5% (2)
- C10% (4)
- D3% (1)
Explanation
MNEMONIC RULE: "Create a new Web Part" Since you already have a user control, you don't need to create a Visual Web Part (by dragging- and-dropping user controls from the Toolbox).
Topics
Community Discussion
No community discussion yet for this question.