WebPartPagesWebService.GetWebPartPageDocument - Méthode
Retourne la Page de composants WebPart, avec les WebParts et les propriétés incluses dans chaque zone de composant WebPart.
Espace de noms : WebSvcwebpartpages
Assembly : STSSOAP (dans STSSOAP.dll)
Syntaxe
'Déclaration
<SoapDocumentMethodAttribute("https://microsoft.com/sharepoint/webpartpages/GetWebPartPageDocument", RequestNamespace := "https://microsoft.com/sharepoint/webpartpages", _
ResponseNamespace := "https://microsoft.com/sharepoint/webpartpages", _
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function GetWebPartPageDocument ( _
documentName As String _
) As String
'Utilisation
Dim instance As WebPartPagesWebService
Dim documentName As String
Dim returnValue As String
returnValue = instance.GetWebPartPageDocument(documentName)
[SoapDocumentMethodAttribute("https://microsoft.com/sharepoint/webpartpages/GetWebPartPageDocument", RequestNamespace = "https://microsoft.com/sharepoint/webpartpages",
ResponseNamespace = "https://microsoft.com/sharepoint/webpartpages",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public string GetWebPartPageDocument(
string documentName
)
Paramètres
documentName
Type : System.StringLe nom de la Page de composants WebPart.
Valeur renvoyée
Type : System.String
string qui contient la Page de composants WebPart associés de WebParts et propriétés.
Remarques
La méthode GetWebPartPageDocument renvoie toujours l'affichage partagé de la Page de composants WebPart.
Pour accéder à ses méthodes et le service WebPartPagesWebService , définissez une référence Web à http://Virtual_Server_Name:Port_Number/_vti_adm/WebPartPages.asmx.
Exemples
L'exemple de code suivant montre une méthode définie localement GetWebPartPageDocument qui obtient une Page de composants WebPart en appelant la méthode GetWebPartPageDocument du service de Pages de composants WebPart via un proxy. Il affiche ensuite la Page de composants WebPart, les WebParts sur la page, leurs propriétés et leurs valeurs de propriété. Cet exemple de code et le proxy font partie d'un exemple plus développé fourni pour le service des Pages de composants WebPart.
Private Sub GetWebPartPageDocument()
' NOTE: The Web Service we are using is defined on MyServer/_vti_bin
' Declare and initialize a variable for the WebPartPages Web Service.
Dim svc = New Microsoft.Samples.WebPartPagesSvcClient.WebpartpagesSvc.WebPartPagesWebService()
' Authenticate the current user by passing their default
' credentials to the Web Service from the system credential cache.
svc.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim result As String = ""
' docName accepts full HTTP urls or relative paths under root
Dim docName As String = "http://MyServer/Shared%20Documents/SampleStart.aspx"
result = svc.GetWebPartPageDocument(docName)
Console.WriteLine("Result is: " + ControlChars.Lf + " {0}" + ControlChars.Lf, result)
Console.WriteLine("-----Hit enter-----")
Console.ReadLine()
End Sub 'GetWebPartPageDocument
private void GetWebPartPageDocument()
{
// NOTE: The Web Service we are using is defined on MyServer/_vti_bin
// Declare and initialize a variable for the WebPartPages Web Service.
WebpartpagesSvc.WebPartPagesWebService svc = new Microsoft.Samples.WebPartPagesSvcClient.WebpartpagesSvc.WebPartPagesWebService();
// Authenticate the current user by passing their default
// credentials to the Web Service from the system credential cache.
svc.Credentials = System.Net.CredentialCache.DefaultCredentials;
string result = "";
// docName accepts full HTTP urls or relative paths under root
string docName = "http://MyServer/Shared%20Documents/SampleStart.aspx";
result = svc.GetWebPartPageDocument(docName);
Console.WriteLine("Result is: \n {0}\n",result);
Console.WriteLine("-----Hit enter-----");
Console.ReadLine();
}