Simply drag and drop the
CalendarExtender control on a page along with a TextBox control, and set the appropriate
properties similar to the following code snippet:
"TextBox1" runat="server">
When you run this page, you only have to click the text box to see the Calendar
control pop up with the result of the date selection entered into the text box as shown
in Figure 7-10.
Figure 7-10. ASP.NET AJAX Calendar control
Notice the great transition from month to month when you click on the arrows of the
Calendar control. Of course, you can further enhance the appearance of the control by
using CSS and assigning it to the CssClass property of the Calendar control. Also, if you
click on the month (on top of the control), the calendar switches to the year view (see
Figure 7-11).
CHAPTER 7 ?– USING THE ASP.NET AJAX CONTROL TOOLKIT (PART 1) 148
Figure 7-11. ASP.NET AJAX Calendar control (Year view)
Lastly, if you wanted to have a little button next to the text box as the agent to open
the calendar, all you have to do is set the PopupButtonID property of this control to the ID
of the button.
Pages:
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225