DAVAdapter.Submit Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Executes the submit operation on the associated adapter.
public:
void Submit();
public void Submit ();
abstract member Submit : unit -> unit
Public Sub Submit ()
Examples
In the following example, the Submit method of the DAVAdapterObject object is used to submit an XML document to a Windows SharePoint Server document library. This code requires a SharePoint form library Data Connection named "Submit".
// Get the first data adapter; a "SharePoint Library" submit adapter
DAVAdapter davAdapter = thisXDocument.DataAdapters["Submit"] as DAVAdapter;
if (davAdapter == null)
{
thisXDocument.UI.Alert("SharePoint submit list adapter called 'Submit' was not found.");
return;
}
// Set the file name to be the today's date (as an .xml file)
davAdapter.FileName = DateTime.Today.ToShortDateString() + ".xml";
if (davAdapter.SubmitAllowed)
{
try
{
davAdapter.<span class="label">Submit</span>();
}
catch (Exception ex)
{
// The save failed
thisXDocument.UI.Alert("Saving to " + davAdapter.FolderURL + " as " + davAdapter.FileName + " failed." + Environment.NewLine + "Reason: " + ex.Message);
}
}
else
{
thisXDocument.UI.Alert("Submit is not allowed on adapter " + davAdapter.Name + ".");
}
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應