This type of control gives the developer the
ability to access the tag??™s properties from the server-side code. If you add an element
such as the following to your ASPX page, your code-behind class will have an
instance variable of the same name:
Click meIn this example, the code-behind class will have an instance variable named myLink,
which is an instance of the HtmlAnchor class. You can use this instance variable to get
or set properties on the hyperlink tag.
Web controls: These classes duplicate the functionality of basic HTML tags but have
methods and properties that have been standardized across the entire set of web
controls, making it easier for developers to use them. Usually web controls are prefixed
by asp:, such as
. With custom web controls, however, you can
choose the prefix as well. Many of them are analogous to HTML server controls
(e.g., the hyperlink) but have methods and properties that are designed to be used
CHAPTER 2 ?– TAKING AJAX TO THE NEXT LEVEL 18
by .NET developers using C# or VB.
Pages:
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64