The ServiceReferenceCollection object contains a ServiceReference object for each Web service that is registered in an ASP.NET AJAX page. Web services can be defined in the ScriptManager control or in an associated ScriptManagerProxy control.
You can add Web services to the ServiceReferenceCollection object declaratively by adding one or more <asp:ServiceReference> elements to a <Services> element inside the <asp:ScriptManager> element on the page, as shown in the following example.
<asp:ScriptManager ID="SM1" runat="server">
<asp:ServiceReference Path="Service1.asmx" />
<asp:ServiceReference Path="Service2.asmx" />
You can also programmatically add a ServiceReference object to the Services collection by using the Add(Q) method of the ServiceReferenceCollection class.
Web services are registered with the ScriptManager control during the page's PreRender life cycle stage.
for operating in a hosted environment. Demand value: LinkDemand. Associated enumeration: Minimal.
for operating in a hosted environment. Demand value: InheritanceDemand. Associated enumeration: Minimal.
Assembly: System.Web.Extensions (Module: System.Web.Extensions)