nerdexam
Microsoft

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).

Developing for User Experience

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)
  • A
    83% (33)
  • B
    5% (2)
  • C
    10% (4)
  • D
    3% (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

#sandboxed solution#Web Part#user control migration#Visual Web Part

Community Discussion

No community discussion yet for this question.

Full 70-573 Practice