ReorderList Control

In many web and desktop applications, you may have come across the typical UI construct for reordering lists that is often done by two buttons one for Up and another for Down placed adjacent to the list itself. The user then has to select the item in the list and click the appropriate button enough times to get the selected item in the designated position. It would certainly be nice to be able to simply drag the item to the desired position instead. You have already seen how easy it is with the...

ConfirmButtonExtender Control

The ConfirmButtonExtender control, as the name suggests, captures the Click event of a button and displays a confirmation dialog box. If the user clicks OK after that, the button will function as implemented otherwise, the Click event will simply be ignored. This control is so simple that it only has two properties TargetControlID and ConfirmText. As you probably have guessed already, TargetControlID contains the ID of the target button, and ConfirmText holds the text message that will be...

Using the UpdatePanel UpdateProgress and Timer Controls

For this first example, consider the following scenario You have a data-driven web page that needs to continuously alert the user with fast changing data, for instance, a page that displays the major financial indices in the U.S. capital markets Dow Jones Industrial Average DJIA , NASDAQ, and S amp P500. One approach is to place a lt META gt tag in your page with refresh values that then force the page to refresh itself in regular intervals based on the provided value. But if you wanted to make...

CascadingDropDown Control

The CascadingDropDown control is ideal for situations when you need to have multiple drop-downs on a web page with the value s of each drop-down control being dependent on the selection from the previous one. In fact, you've probably seen many sites taking advantage of this pattern. For instance, when you visit your printer or other computer accessories' manufacturer site in search of the appropriate driver s , you are often presented with a list of drop-down controls in order to find the right...

Introducing the ASPNET AJAX Architecture

The ASPNET AJAX architecture, which is illustrated in Figure 2-5, consists of two major pieces. First is the Microsoft AJAX Library, which makes developing the client-side functionality of AJAX web applications easier and less time consuming. It has core classes that extend JavaScript to support object-oriented OO scripting represented by the Core Services block. It also consists of a base class library, which provides classes that offer extended error handling among other things. There is a...

Using the UpdatePanel Control

To use an UpdatePanel control, you simply drag and drop it onto the design surface of your web form see Figure 5-5 . Figure 5-5. Placing an UpdatePanel control on a web form Figure 5-5. Placing an UpdatePanel control on a web form However, as you know, the UpdatePanel control cannot function without a ScriptManager control on the page. Additionally, the ScriptManager control must be located before any UpdatePanel controls on your page. In other words, as you read your source code from top to...

PasswordStrength Extender

At times, security is of particular concern in your web application, and you may need to consider enforcing a password policy, most commonly in a login page. Although it's possible to do so today with existing validation controls and or custom code, it can be somewhat tedious to enforce a password policy along with responsive user feedback without postbacks. The PasswordStrength extender is associated with a TextBox control and is highly configurable as to what constitutes a strong or weak...

NumericUpDown Extender

The NumericUpDown extender can easily be associated with any TextBox control and allow the user to increment or decrement numeric values as well as custom-defined values defined at design time, such as the days in a week or months in a year. By default, this extender assumes - 1 for incrementing or decrementing values, but you can define a set of values for the NumericUpDown extender to enumerate through by using the RefValues property. Table 8-9 lists the main properties of this extender....

NoBot Extender

In an effort to prevent crawlers, automated scripts, and or other programs also referred to as BOTS from creating false accounts or getting access to sensitive information, many web sites started using CAPTCHA Completely Automated Public Turing test to tell Computers and Humans Apart controls, which are credited to the Carnegie Mellon University. CAPTCHAs are simply distorted images of encoded text that are displayed alongside a text box that the user is challenged to enter the encoded text...

DragPanelExtender Control

The DragPanelExtender control is without a doubt one of the coolest controls in the ASP.NET AJAX Control Toolkit it allows the user to drag around a panel on a web page. As you can imagine, manually implementing this type of functionality with client-side JavaScript is a grand endeavor. In addition to that, this control has only two properties and is extremely easy to use. Other than the TargetControlID property, which you know all too well by now, the DragPanelExtender control has another...

Slider Extender

Slider controls are excellent UI constructs for allowing the user to change the settings for some entity. This is essentially a graphical way of changing an underlying number value. And as if you couldn't have guessed by now, the Slider extender provides an easy way to implement a slider-type control in your web pages by extending a TextBox control. By default, the range of numbers for this extender is from 0 to 100, but that can certainly be changed using the Minimum and Maximum properties....

The AnimationExtender Control

The Animation control is by far the most capable and feature-packed control in the ASP.NET Control Toolkit. It provides excellent support for a wide range of animation features in an AJAX-enabled ASPNET page. This powerful control, which can also be considered a framework given its depth, enables rich animation in a declarative XML fashion. Coverage of this control in its entirety is well outside the scope of this chapter, so we'll cover only a few animation types. The AnimationExtender control...

MaskedEdit and MaskedEditValidator Extenders

As mentioned earlier, often most web applications require input from the user in one form or another. Validation logic is usually written on either the client or server side or quite often both. Client-side JavaScript can provide quick feedback to the user without a round-trip to the server, whereas server-side validation has the added benefit of having access to business logic and or data access on the server. However, ensuring data integrity and validation is best done when the range of user...

SlideShow Extender

Once rare, you don't have to look far on the Internet to find a plethora of sites with slide show elements in them. In addition to large photo-sharing sites, many smaller sites now allow their users to create custom slide shows. With the ASP.NET AJAX SlideShow extender, you too could easily add a simple slide show to your site. This extender uses a web service to get a list of images through which it will iterate. In addition to the configurable delay time between the image transitions, you can...

NamespaceDescription

Sys Root namespace also contains some base classes such as Sys.Net Provides networking and communication support such as facilities to Sys.UI Contains a set of classes for comprehensive UI support, such as events Sys.Services Provides support for ASP.NET application services, such as Sys.Serialization Provides support for data serialization JSON Sys.WebForms Contains classes for asynchronous page loading, among others The root Sys namespace includes classes and interfaces used throughout the...

DropShadow and RoundedCorners Extenders

The DropShadow and RoundedCorners extenders are similar in that they both offer visual enhancements to panels and other controls, particularly curved corners. First, let's examine the DropShadow extender. The DropShadow extender enables you to enhance the appearance of panels by adding curved corners and background shadow to the panel control. Typically, this is done by using images for the curved corners and CSS styling, among other things, for the shadow effect. The DropShadow extender allows...

TabContainer and TabPanel Control

Tabs are fundamental and useful UI elements that are becoming increasingly popular in web applications. The highly extensible duo controls TabContainer and TabPanel provide for a highly functional and AJAX-style tab support in your web application. The TabContainer control is a host control that can contain one or more TabPanel controls. These tabs can be customizable because just about any HTML markup can exist in the ContentTemplate or HeaderTemplate sections of the TabPanel control. Tables...

CollapsiblePanelExtender Control

The CollapsiblePanelExtender control allows you to easily make visually appealing collapsing and expanding effects on panels used in your web page with minimal code. This extender is quite simple yet very flexible and is particularly useful in scenarios where you have large amounts of text, some of which does not need to be initially presented to the users. Also with many useful properties, its collapse expansion behavior can be well customized. This includes the ability to have the panel auto...

Drawing the Price History Graph with ZedGraph

To implement the price history graph, you can use a new web form. The Source Code Download area on the Apress web site www.apress.com contains the web form in a file called PH.aspx. This web form contains a single ZedGraph control. When you place a ZedGraph control from your Toolbox onto a web form, it draws the default chart you saw in Figure 10-13. You can see the PH.aspx page in the web form designer in Figure 10-14. Figure 10-14. Placing the ZedGraph on a web form Figure 10-14. Placing the...

Acknowledgments

First and foremost, thanks to everyone at Apress who helped make this book possible including Ewan Buckingham, Julie McNamee, and Janet Vail. I especially would like to thank the wonderful Beth Christmas for her continuing patience and understanding. I'd also like to extend a big thank you to Andy Olson for his excellent technical reviews done with great diligence and attention to detail. Above all, I would like to thank Ted Kasten and Katja Svetina for their patience and incessant warm support...