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 217 | Next

Robin Pars, Laurence Moroney, and John Grieb

"Foundations of ASP.NET AJAX"

NET drop-down controls at the beginning of this code segment make
up the three selection points, which are followed by the three CascadingDropDown controls.
Each of these extender controls specifies the corresponding drop-down (by using the
TargetControlID property) as well as the ServicePath ServiceMethod properties, which will
be used as a data source. And that??™s it! Beyond that, there is a little more code on the web
form itself that displays text to the users in the appropriate event handlers. The rest of the
work is done in a web service as listed here:
[WebMethod]
public AjaxControlToolkit.CascadingDropDownNameValue[]
GetDropDownContents(string knownCategoryValues, string category)
CHAPTER 7 ?–  USING THE ASP.NET AJAX CONTROL TOOLKIT (PART 1) 152
{
StringDictionary knownCategoryValuesDictionary = AjaxControlToolkit.
CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues);
return AjaxControlToolkit.CascadingDropDown.
QuerySimpleCascadingDropDownDocument(Document, Hierarchy,
knownCategoryValuesDictionary, category);
}
The main part of this web service is the GetDropDownContents web method shown in
the preceding code segment.


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