I have inserted the code and i seem to still be getting errors. I have errors in following places. they are bolded
var oActiveContext = null;
' The following function handler is created by Microsoft Office InfoPath. Do not
' modify the type or number of arguments.
<InfoPathEventHandler(EventType:=InfoPathEventType.OnContextChange)> _
Public Sub OnContextChange(ByVal e As DocContextChangeEvent)
if (eventObj.Type != "ContextNode" || eventObj.IsUndoRedo)return;
Try
{
XDocument.SetNamedNodeProperty(oActiveContext, "active", "0");
}
catch(e){}
oActiveContext = eventObj.Context;
XDocument.SetNamedNodeProperty(oActiveContext, "active", "1");
Return
End If
End Sub
End Class