Syntax
CSharp
VisualBasic
ManagedCPlusPlus
JSharp
Value
Return Value
The ServiceReferenceCollection for the current ScriptManager instance.
Remarks
The ServiceReferenceCollection object that is returned by this property is a collection of ServiceReference objects, each of which represents a Web service that is registered with the page. Services can be defined in the ScriptManager control or in an associated ScriptManagerProxy control.
You can add services to the collection in markup by adding <asp:ServiceReference> nodes to a <Services> node inside the <asp:ScriptManager> instance on the page, as shown in the following example.
<asp:ScriptManager ID="SM1" runat="server">
<Services>
<asp:ServiceReference Path="Service.asmx" />
</Services>
</asp:ScriptManager>You can also programmatically add a ServiceReference object to the Services collection by using the Add(Q) method of the ServiceReferenceCollection class.
Services are registered with the ScriptManager during the page's PreRender life-cycle stage.
Assembly: System.Web.Extensions (Module: System.Web.Extensions)