Prev | Current Page 606 | Next

Rob Cameron and Dale Michalk

"Pro ASP.NET 3.5 Server Controls and AJAX Components"

Likewise, since the
FancyLabel custom server control inherits from WebControl, the FancyLabelAdapter control
adapter must inherit from WebControlAdapter.
For the control adapters to be picked up by ASP.NET, an ASP.NET folder must be added to
the web project by right-clicking the web project and selecting Add ??¤ Add ASP.NET Folder ??¤
App_Browsers. In this folder, create a file with any name and with the file extension of .browser. If
you right-click App_Browsers and select Add ??¤ New Item, you can select Browser File in the
Add New Item dialog box to provide a starting file. Listing 10-12 contains our simple .browser
file, named NonMobileAdapter.browser.
Listing 10-12. The NonMobileAdapters.browser File



adapterType="ControlsBook2Lib.Ch10.StatefulLabelAdapter" />
adapterType="ControlsBook2Lib.Ch10.FancyLabelAdapter" />



482 CHAPTER 10 ?–  OTHER SERVER CONTROLS
The adapter elements are commented out when you first unpack the source code so that
the samples from Chapters 3 and 4 run correctly and render the span tag.


Pages:
594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618