WebPartPagesWebService.GetWebPart2 Method
Returns the XML data for a dynamic Web Part.
Namespace: [Webpartpages Web service]
Web service reference: http://Site/_vti_bin/Webpartpages.asmx
Syntax
'Declaration
<SoapDocumentMethodAttribute("https://microsoft.com/sharepoint/webpartpages/GetWebPart2", RequestNamespace := "https://microsoft.com/sharepoint/webpartpages", _
ResponseNamespace := "https://microsoft.com/sharepoint/webpartpages", _
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function GetWebPart2 ( _
pageurl As String, _
storageKey As Guid, _
storage As Storage, _
behavior As SPWebServiceBehavior _
) As String
'Usage
Dim instance As WebPartPagesWebService
Dim pageurl As String
Dim storageKey As Guid
Dim storage As Storage
Dim behavior As SPWebServiceBehavior
Dim returnValue As String
returnValue = instance.GetWebPart2(pageurl, _
storageKey, storage, behavior)
[SoapDocumentMethodAttribute("https://microsoft.com/sharepoint/webpartpages/GetWebPart2", RequestNamespace = "https://microsoft.com/sharepoint/webpartpages",
ResponseNamespace = "https://microsoft.com/sharepoint/webpartpages",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public string GetWebPart2(
string pageurl,
Guid storageKey,
Storage storage,
SPWebServiceBehavior behavior
)
Parameters
pageurl
Type: System.StringA string containing the URL of the page containing the Web Part
storageKey
Type: System.GuidA GUID that identifies the Web Part
storage
Type: [Webpartpages Web service].StorageA Storage value indicating how the Web Part is stored
behavior
Type: [Webpartpages Web service].SPWebServiceBehaviorAn SPWebServiceBehavior enumeration object indicating whether the client supports Windows SharePoint Services 2.0 or Windows SharePoint Services 3.0.
Return Value
Type: System.String
A string containing the XML for a Web Part to include the type and assembly name fields.
Remarks
To access the WebPartPagesWebService service and its methods, set a Web reference to http://Virtual_Server_Name:Port_Number/_vti_adm/WebPartPages.asmx.