SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 142 | Next

Rob Cameron and Dale Michalk

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


There are a few different technologies available to integrate and extend the Visual Studio environment.
Attributes provide one means to extend Visual Studio and are used to integrate custom
server controls into the environment. Before we present a quick overview of the most important
design-time attributes, we provide a short background on attributes.
What??™s an Attribute?
An attribute is essentially a class that contains properties and methods used to modify other
classes, class methods, or class properties. Attribute information is stored with the metadata of
the element and can be retrieved at runtime through reflection.
Attributes can be applied to an entire class or to a specific class method or property. Attribute
classes are defined as public classes. All attributes derive directly or indirectly from the System.
Attribute class, and attribute classes generally end in the word Attribute to enhance readability.
Here is a sample attribute declaration:
public class SampleAttribute : Attribute
{
}
An attribute is declared within brackets just before the element to which it is applied. The
syntax consists of calling a constructor on the attribute. Here is how an attribute is applied to a
class method:
CHAPTER 2 ?–  ENCAPSULATING FUNCT IONALITY IN ASP.


Pages:
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6