Hello, actually when i need to write code in a info
path i create a visual studio projet for my info path form template
then add handle to click button event and write my code in C# with
XPathNavigator.
I found that i can generate a "classes" base on a xds schema using the "xsd.exe" tools in a visual studio command prompt.
That work fine, I've generate my classes using this tools, and now i have a "myclass.cs".
But how can i initialize the "myclass" object, set value like i normally does with the XPathNavigator and then save it?
Code sample:
//Actual code
XPathNavigator DOM = MainDataSource.CreateNavigator();
DOM.SelectSingleNode("/my:myFields/@my:field1").SetValue("myval");
this.Save(); //Built-in functionality, not override
//What i'm trying to do.
MyClass o = new MyClass(); //How to initialize with the actual content??
o.field1 = "mynewvalue";
//Now how can i save the new value?