Sorry for the delay. I really don't know how to answer your questions. Like I said, I'm pretty new to ASP and AJAX myself and still trying to make sense of it all.
A web service "allows distributed applications to share business logic over a network". You can use them in a variety of ways. One of the few ways I've implemented them is using cascading dropdowns in the sample code I gave earlier. There's lots of different ways to consume a web service, but I don't have much experience with them. I did a search on consuming webservices and got tons of hits, this would probably be a better learning tool for you.
As far as your specific questions about the code sample, perhaps a little more of the actual code would help make sense. There are two drop downs. The first has a data source and the datavaluefield is "RoleId". RoleId is used by the serviceMethod "GetEmployeesByRole". The two dropdowns are "tied" together within the cascading dropdown's code "parentcontrol=ddlRole" and "targetcontrol=ddlEmployee".
Role:
<asp:DropDownList ID="ddlRole" runat="server"
DataSourceID
="ods_Roles" DataTextField="RoleName" DataValueField="RoleId"OnSelectedIndexChanged="Page_Load" ToolTip="Narrow results by selecting a Role.">
</
asp:DropDownList>
Volunteer:
<asp:DropDownList ID="ddlEmployee" runat="server" ToolTip="Narrow results by selecting an employee(s)."></asp:DropDownList>
<
ajaxToolkit:CascadingDropDown ID="cddlEmployee" runat="server"Category="Roles" LoadingText="Please wait..."
ParentControlID="ddlRole" PromptText="Select a Volunteer"TargetControlID="ddlEmployee"
ServicePath="http://localhost:65269/OpenDoor/ODCService.asmx" ServiceMethod="GetEmployeesByRole" />
<
asp:ObjectDataSource ID="ods_Roles" runat="server"
OldValuesParameterFormatString
="original_{0}"
SelectMethod
="GetRoles"
TypeName
="dsRoleTableAdapters.RolesTableAdapter"></asp:ObjectDataSource>
<
asp:Button ID="Button2"
runat
="server" Text="Get Schedules" onClick="ddl_SelectedIndexChange"/>
Good Luck!