nerdexam
Microsoft

70-573 · Question #237

You need to convert a user control named Control.ascx to a SharePoint Web Part. The Web Part must be packaged as a user solution. What should you do?

The correct answer is D. Create a new Web Part and reuse the code from the 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-droppinguser controls from the Toolbox).

Developing SharePoint Solutions

Question

You need to convert a user control named Control.ascx to a SharePoint Web Part. The Web Part must be packaged as a user solution. What should you do?

Options

  • AModify the SafeControls section of the web.config file.
  • BCopy the Control.ascx file to the ControlTemplates folder.
  • CCreate a new Visual Web Part and use the existing MyControl.ascx file.
  • DCreate a new Web Part and reuse the code from the MyControl.ascx file.

How the community answered

(20 responses)
  • A
    20% (4)
  • B
    5% (1)
  • C
    5% (1)
  • D
    70% (14)

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-droppinguser controls from the Toolbox).

Topics

#user control#Visual Web Part#solution packaging#ASCX

Community Discussion

No community discussion yet for this question.

Full 70-573 Practice