DAVAdapterObject interface

Represents a connection to submit form information to a Microsoft Windows SharePoint Services server, or other servers that support DAV connections.

Namespace:  Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly:  Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)

Syntax

'Declaration
<GuidAttribute("096cd5d6-0786-11d1-95fa-0080c78ee3bb")> _
Public Interface DAVAdapterObject _
    Inherits DAVAdapter
'Usage
Dim instance As DAVAdapterObject
[GuidAttribute("096cd5d6-0786-11d1-95fa-0080c78ee3bb")]
public interface DAVAdapterObject : DAVAdapter

Remarks

This type is a wrapper for a coclass that is required by managed code for COM interoperability. Use this type to access the members of the COM interface implemented by this coclass. For information about the COM interface, including a link to descriptions of its members, seeDAVAdapter.

Use the Item property of the DataAdaptersCollection to return a DAVAdapter object.

Examples

In the following example, the Submit method of the DAVAdapterObject object is invoked in the OnSubmitRequest event if the destination is reachable, otherwise a message box is displayed:

[InfoPathEventHandler(EventType=InfoPathEventType.OnSubmitRequest)]
public void OnSubmitRequest(DocReturnEvent e)
{
 DAVAdapterObject davAdapterObj = thisXDocument.DataAdapters[0] as DAVAdapterObject;
 bool reachable = thisApplication.IsDestinationReachable("https://localhost/application");
 if (reachable)
 {
  if (davAdapterObj == null)
  {
   thisXDocument.UI.Alert("First DataAdapter does not exist or is not a DAVAdapterObject.");
   return;
  }
  davAdapterObj.Submit();
  e.ReturnStatus = true;
 }
 else
 {
  thisXDocument.UI.Alert(davAdapterObj.FolderURL + " is not reachable.");
  e.ReturnStatus = false;
 }
}

See also

Reference

DAVAdapterObject members

Microsoft.Office.Interop.InfoPath.SemiTrust namespace