Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ScriptManager.Services Property

Gets a ServiceReferenceCollection object that contains a ServiceReference object for each Web service that ASP.NET exposes on the client for Ajax functionality.

Namespace:  System.Web.UI
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)
[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
public ServiceReferenceCollection Services { get; }

Property Value

Type: System.Web.UI.ServiceReferenceCollection
The ServiceReferenceCollection object for the current ScriptManager instance.

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 ScriptManager control . You can define services in the ScriptManager control or in an associated ScriptManagerProxy control.

You can add services to the collection in markup by adding an asp:ServiceReference element to a Services element 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 method of the ServiceReferenceCollection class.

Services are registered with the ScriptManager during the page's PreRender life-cycle stage.

.NET Framework

Supported in: 4, 3.5

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.