How to close an infopath form in C# style?
I am trying to close the browser (aka where infopath form is loaded) with managed code. I tried some for variation below but getting error and unable to compile the code.
thisXDocument.View.Window.Close(); - Gives me "Invalid token '(' in class, struct, or interface member declaration" if I put the code about 2 curly bracket at end end.
if i put the above code just before }); then i get following error.
"'XDocument' does not exist in the current context "
Same things happens with following alternatives