ScriptManager.Services ScriptManager.Services ScriptManager.Services ScriptManager.Services Property

Definición

Obtiene un objeto ServiceReferenceCollection que contiene un objeto ServiceReference para cada servicio Web que ASP.NET expone en el cliente para la funcionalidad de Ajax.Gets a ServiceReferenceCollection object that contains a ServiceReference object for each Web service that ASP.NET exposes on the client for Ajax functionality.

public:
 property System::Web::UI::ServiceReferenceCollection ^ Services { System::Web::UI::ServiceReferenceCollection ^ get(); };
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
public System.Web.UI.ServiceReferenceCollection Services { get; }
member this.Services : System.Web.UI.ServiceReferenceCollection
Public ReadOnly Property Services As ServiceReferenceCollection

Valor de propiedad

Comentarios

El ServiceReferenceCollection objeto devuelto por esta propiedad es una colección de ServiceReference objetos, cada uno de los cuales representa un servicio Web que está registrado con el ScriptManager control.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 . Puede definir los servicios en la ScriptManager control o en un asociado ScriptManagerProxy control.You can define services in the ScriptManager control or in an associated ScriptManagerProxy control.

Puede agregar servicios a la colección en el marcado mediante la adición de un asp:ServiceReference elemento a una Services elemento dentro de la asp:ScriptManager de instancia en la página, tal como se muestra en el ejemplo siguiente.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>  

Puede agregar mediante programación un ServiceReference de objeto para el Services colección mediante el Add método de la ServiceReferenceCollection clase.You can also programmatically add a ServiceReference object to the Services collection by using the Add method of the ServiceReferenceCollection class.

Los servicios se registran con el ScriptManager durante la página PreRender fase del ciclo de vida.Services are registered with the ScriptManager during the page's PreRender life-cycle stage.

Se aplica a