October 2010
Intermediate to advanced
1920 pages
73h 55m
English
You can mix the list items that you declare in a List control and the list items that are added to the control when it is bound to a data source. This is useful when you want to display a default selection.
For example, imagine that you create a form in which you want to require a user to pick an item from a List control. In this situation, you should add a default item to the List control so that you can detect whether a user has actually picked an item.
You can mix declarative list items with databound list items by assigning the value True to the AppendDataBoundItems property. The page in Listing 10.6 illustrates how you can add a default list item to a List control (see Figure 10.6).
Figure 10.6. Displaying a default ...