I have some checkboxes in a form that can perform a couple of functions depending on the value of a textbox. Things work correctly, except that OnAfterChange is firing twice, and I have no idea why...
Here's a simplified snippet:
[InfoPathEventHandler(MatchPath="/my:Form/my:Checkbox", EventType=InfoPathEventType.OnAfterChange)]
public void Checkbox_OnAfterChange(DataDOMEvent e)
{
string myTextboxText = thisXDocument.DOM.selectSingleNode("/my:Textbox").text;
if(myTextboxText != "")
thisXDocument.UI.Alert("Please enter something in the textbox");
}
Any help you can provide is greatly appreciated.
Thanks,
-DC Ross