The markup in your page now has the
tag already defined. Here??™s an example of a timer that has been customized with a
4,000-millisecond interval (4 seconds), with the name Timer1, and the event handler
Timer1_Tick:
Now, within the Timer1_Tick method in the code-behind class, you can perform an
operation each time the timer fires, such as updating the time. An AsyncPostBackTrigger
trigger is used within an UpdatePanel to trigger an update on the Timer??™s Tick event. You
can see this in the following markup:
If you run the page, you??™ll notice that the Label control updates every four seconds
with the new time without doing a full page refresh (see Figure 5-13).
Pages:
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181