I have created another view in the XSN that doesn't have a submit button. The only thing it has on it is a back button at the top that goes to the main form, a Rich Text Box inside of a repeating section in the middle, and a button at the bottom that writes output to the windows log. I duplicated the same failure procedure (entering text and pressing the button, back to main form, going to sub-form, creating another section, entering text, and pressing the button). Around the 6th or 7th time, the text in the newly created rich text box disappears. Here is the only code that is on the button at the bottom of the form. It iterates through the group that the Rich Text or XHTML field is in, and prints all of the values to the windows log. On the one that disappears, there is an entry into the event log that reads "rich text = ". This tells me that the count in "group2" is accurate. "group2" is the folder that is associated with the repeating section that the Rich Text Box is in. It knows that there is a newly created section in the repeating section, but the value of "testingRichTextStuffs" is "".
try
{
XPathNavigator nav1 = MainDataSource.CreateNavigator();
XPathNodeIterator iterator = nav1.Select("/my:myTipLead/my:group1/my:group2", NamespaceManager);
while (iterator.MoveNext())
{
XPathNavigator node = iterator.Current;
node.MoveToChild("testingRichTextStuffs", node.NamespaceURI);
EventLog.WriteEntry(ERROR_SOURCE, "rich text = " + node.Value);
}
}
catch (Exception exce)
{
WriteToLog("there has been an error");
}
Thank you for your help