Hello,
at first, set you secruitylevel on auto! every form that has code, is automaticly domaintrust. and write your code in the loading event! form options>programming>load event.
If your code doesnt work, try this:
using System.Xml;
using System.Xml.XPath;
System.Xml.XPath.XPathNavigator root, user;
root = this.MainDataSource.CreateNavigator();
user = root.SelectSingleNode("//my:language", this.NamespaceManager);
if (user.Value.Length <= 0)
user.SetValue(<put in a variable>.toString());
Hope this helped