SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 214 | Next

Robin Pars, Laurence Moroney, and John Grieb

"Foundations of ASP.NET AJAX"


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 model.
CascadingDropDown, much like the AutoCompleteExtender control, relies on web services
to provide the necessary data. This allows for much flexibility in retrieving the data. You
could, for instance, fetch the data from a database, serialized file, XML file, or some thirdparty
source. Before jumping right into an example, Table 7-6 shows the properties of the
CascadingDropDown control.
CHAPTER 7 ?–  USING THE ASP.NET AJAX CONTROL TOOLKIT (PART 1) 149
Table 7-6. Properties of the CascadingDropDown Control
Property Name Description
Category Category name of the CascadingDropDown control
LoadingText Status text shown on the control itself while the data for the drop-down
is being fetched
ParentControlID The ID of the other drop-down control whose selection impacts this
control
PromptText Text shown if the drop-down is empty
ServiceMethod Name of the web method used to retrieve the data
ServicePath Path of the web service used to retrieve the data
TargetControlID ID of the target corresponding DropDown control
You may have also seen cascading drop-downs on many car shopping/searching
sites, in which you start with the manufacturer of the car and end up with the exact
model of the car.


Pages:
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226