. . . . . . . . . . 190
Invoking an Event in a Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Adding an Event to the TextBox Control . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Enhancing the TextBox Control with a TextChanged Event . . . . . . 191
Using the TextBox Control on a Web Form . . . . . . . . . . . . . . . . . . . 194
x ?– CONTENTS
Creating a Custom Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Creating a TextChangedEventArgs Class . . . . . . . . . . . . . . . . . . . . . 198
Creating a TextChangedEventHandler Delegate . . . . . . . . . . . . . . . 199
Adding an Event to the CustomEventTextBox Control . . . . . . . . . . 200
Using the CustomEventTextBox Control on a Web Form . . . . . . . . 203
Capturing Postback with the Button Control . . . . . . . . . . . . . . . . . . . . . . 207
Rendering the Button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Exposing a Click Event and the Events Collection. . . . . . . . . . . . . . 209
Command Events and Event Bubbling . . . . . . . . . . . . . . . . . . . . . . . 211
Exposing the Command Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Pages:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25