
Testing the Control Designers in Visual Studio 2005
After adding the compiled assembly .dll file to your Web site's Bin folder, adding the XML files, adding a host page with the custom controls referenced on it, and creating the entry in the Web.config file, you can work with the controls in the designer. Make sure the page is open in Design view in Visual Studio 2005. Note that there are three panel controls on the page. If you click the control, a region you can edit is outlined.
Testing Designer Services and Action Lists
You can test the first control's designer by positioning the mouse pointer over the upper right-hand corner of the control, and then clicking the action list button. The following screen shot shows the control with the action list displayed.
Control with action list displayed
.gif)
In the Configure Xml text box on the action list, you can select from the XML files you created earlier. Selecting one of the existing XML files updates the design-time style of the control with the style information from that XML file. You can try the same technique using the names of the other XML files.
Clicking the action list button for the third control displays an action list like the one shown in the following screen shot.
Third control action list
.gif)
The Add a Button command adds a Button control to the design-time view. The Add a custom button command adds an instance of a custom button control to the page.
Testing Designer Services and Editable Regions
The second control displays the caption Title Added From Config. The designer uses designer services to extract this setting from the Web.config file and add it to the design-time view.
The control also presents an editable region on the control. You can click the editable area to type new content. The content is persisted to the page's source code.