How to remove attachment from the infopath attachment control programatically RRS feed

  • Question

  • Hi,

    I have an infopath (2010) form with attachment control,i am uploading this attchment to document library using workflow.

      XPathNavigator dealNode = addLbUserIpFormNav.SelectSingleNode("//my:DealID", nsManager);
                    XPathNavigator stageNode = addLbUserIpFormNav.SelectSingleNode("//my:CurrentStage", nsManager);
                    XPathNavigator addLbUserNodeNav = addLbUserIpFormNav.SelectSingleNode("//my:lbDocAttachment", nsManager);
                    if (addLbUserNodeNav.ToString() == "")
                    uploadFile(addLbUserNodeNav, dealNode.Value, stageNode.Value);

    After uploading attchment to document library ,i want to remove the attached file from the infopath attachment control.

    I tried this.
    addLbUserNodeNav.SetValue("");While building it is not giving error

    But is showing run time error "cannt support this method";

    Thursday, August 9, 2012 9:02 AM