Hi,
You can name the form by using the following code.
public void SubmitToSharePoint(string submitAdapterName, string
sharePointFolderPath, string fileName)
{
DAVAdapter sharePoint =
(DAVAdapter)thisXDocument.DataAdapters[submitAdapterName];
sharePoint.FileName = fileName;
sharePoint.FolderURL = sharePointFolderPath;
sharePoint.Submit();
}
In the above code 'submitAdapterName' is SharePoint data connection name,
'sharePointFolderPath' is path to SharePoint form library, 'fileName' is name
to the file you are submitting.
Dont forget to add ".xml" to the file name while calling the function.
e.g:
SubmitToSharePoint("Submit Connection",
"http://<server>/<Site>/<FormLibrary>", DateTime.Now.ToString() + ".xml")