_XDocument2.SaveAs(String) Method

Definition

Saves the form to the specified Uniform Resource Locator (URL).

public:
 void SaveAs(System::String ^ bstrFileUrl);
public void SaveAs (string bstrFileUrl);
abstract member SaveAs : string -> unit
Public Sub SaveAs (bstrFileUrl As String)

Parameters

bstrFileUrl
String

The URL address that the form should be saved to.

Implements

Examples

if(thisXDocument.IsNew)
{
thisXDocument.<span class="label">SaveAs</span>("c:\\myforms\\form1.xml");
}
else
{
thisXDocument.Save();
}
if(thisXDocument.IsNew)
{
thisXDocument.<span class="label">SaveAs</span>("c:\\myforms\\form1.xml");
}
else
{
thisXDocument.Save();
}

Remarks

The SaveAs method will return an error if called from a form that is not fully trusted.

Note: The URL that the form is saved to must be in the same domain as the form that calls the SaveAs method.

Important: This member can be accessed only by forms opened from a form template that has been configured to run with full trust using the Security and Trust category of the Form Options dialog box. This member requires full trust for the immediate caller and cannot be used by partially trusted code. For more information, see "Using Libraries from Partially Trusted Code" on MSDN.

Applies to