I am trying to programmatically raise a infopath button click event from code behind. Is there any way this can be done?
Here's what the situation is
1.This is for a Web-based form app
2. I have two buttons A and B, each has their rules and code behind
3. On clicking of button A, (after its rules and code behind are run) I need to programmatically simulate click of button B
4. Just calling the eventhandler of B from A doesn't work since I also need to run the rules associated with A.
Any help would be greatly appreciated.
Here's what I wanted to try but didn't work
Call the OnClick method of button B from the event handler of button A using reflection.
However, I wasn't able to a) figure out
a) how to manufacture the DocActionEvent paramter that OnClick wants (since the eventhandler for button B doesn't contain a proto that I could clone or something, instead it contains sender and ClickableEventArgs)
b) Not really sure who to create a Infopath Button Type to use in my code...