tailieunhanh - Professional ASP.NET 3.5 in C# and Visual Basic Part 102

Professional in C# and Visual Basic Part 102. Building on the revolutionary release, adds several key new developer features including AJAX, LINQ, and a new CSS designer in Visual Web Developer 2008. The dramatic reduction in code that developers realized from the more than 50 new server controls in now allows developers the time to make their applications more interactive with AJAX, to work with data in their preferred language with LINQ, and to build visually attractive and consistent standards-based sites with CSS. . | Chapter 20 AJAX Control Toolkit You form a group of CheckBox controls by using the Key property. All the check boxes that you want in one group need to have the same Key value. In the example is Listing 20-20 all the check boxes share a Key value of MyCheckboxes. Running this page results in a list of four check boxes. When you select one of the check boxes a check mark appears. Then when you select another check box first checkbox you selected gets deselected. The best part is that you can even deselect what you have selected in the group thereby selecting nothing in the check box group. NumericUpDownExtender The NumericUpDownExtender control allows you to put some up down indicators next to a TextBox control that enable the end user to more easily control a selection. A simple example of this is illustrated here in Listing 20-21. Listing 20-21 Using the NumericUpDownExtender control @ Page Language C @ Register Assembly AjaxControlToolkit Namespace AjaxControlToolkit TagPrefix cc1 html xmlns http 1999 xhtml head runat server title NumericUpDownExtender Control title head body form id form1 runat server div asp ScriptManager ID ScriptManager1 runat server asp ScriptManager cc1 NumericUpDownExtender ID NumericUpDownExtender1 runat server TargetControlID TextBox1 Width 150 Maximum 10 Minimum 1 cc1 NumericUpDownExtender asp TextBox ID TextBox1 runat server asp TextBox div form body html The NumericUpDownExtender control here extends the TextBox control on the page. When using the NumericUpDownExtender control you have to specify the width of the control with the Width property. Otherwise you will see only the up and down arrow keys and not the text box area. In this case the Width property is set to 150 pixels . The Maximum and Minimum properties provide the range used by the up and down indicators. With a Maximum value setting of 10 and a Minimum value of 1 the only range in the control will be 1 through 10. Running this page produces the results

TỪ KHÓA LIÊN QUAN