Add User Control (with presenter) Recipe

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies.
This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The guidance package includes the recipe named Add User Control (with presenter). After you install the guidance package, the recipe is available on the Solution Explorer shortcut menu that appears when you right-click a folder in a Web site or the Web site root node. Figure 1 illustrates the recipe menu.

Ff709868.a93d14e3-2f65-4136-b01d-ccb5920612de(en-us,PandP.10).png

Figure 21

The Add User Control (with presenter) recipe menu

When you run the recipe, the recipe framework displays a wizard that you can use to customize the generated code. Figure 2 illustrates the wizard.

Ff709868.15a121f7-4049-4ab5-9f9e-97ae4fb10bf7(en-us,PandP.10).png

Figure 22

The Add User Control (with presenter) recipe wizard

For detailed instructions about how to use the Add User Control (with presenter) recipe, see How to: Add a User Control with a Presenter.

Implementation Details

You can find the recipe definition split across the files CreateWebClientFactoryUserControlView.xml and CreateWebClientFactoryViewCommon.xml (these files are located in subfolders under the Recipes folder of the WebClientFactoryPackage project).

The CreateWebClientFactoryViewCommon.xml file is shared by the Add Page (with presenter) recipe, the Add Master Page (with presenter) recipe, and the Add User Control (with presenter) recipe. All three recipes have a similar implementation. For more implementation details, see the section “Implementation Details” in Add Page (with presenter) Recipe.