Question about save form - InfoPath Dev
in

InfoPath Dev

Question about save form

Last post 07-26-2006 12:36 AM by Kalyan Gaddam. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 06-26-2006 05:19 AM

    Question about save form

    I want to put in my form a button that click on it save the form.
    Can I do it (by write code for it in the OnClick event) or Should I use the OnSaveRequest(eventObj) event.

    I know that the line:
    eventObj.IsCancelled = eventObj.PerformSaveOperation

    save the form, But as it seems I can run it only from the OnSaveRequest event!
  • 06-27-2006 12:27 PM In reply to

    Re: Question about save form

    Yes you can save the form in the OnClick Event handler.

    You can use the thisXDocument.SaveAs(string locationToSave) method to save the file in the OnClick Event.

    Is it that what you are looking for?

  • 06-27-2006 02:07 PM In reply to

    Re: Question about save form

    SaveAs is for new form. What bout saving form that not new?
  • 07-25-2006 09:11 PM In reply to

    Re: Question about save form

    any one???
  • 07-26-2006 12:36 AM In reply to

    Re: Question about save form

    Hello,
    This is from the Infopath SDK
    Save Method: Saves the form to the Uniform Resource Locator (URL) that it is currently associated with.

    expression.Save()
    expression Required. An expression that returns a reference to an XDocument object.

    Security Level: Can be accessed only by fully trusted forms.

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

    Example: In the following example, the Save method of the XDocument object is used to save a form:
    XDocument.Save();
    Kalyan G Reddy
    Infopath MVP 2007 and 2008
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.