Infopath 2007 Event Handlers

M

morna

Where are all the event handlers? I have an infopath 2007 template
with code behind written in C#. When I try to find the event handlers
- I only get a very limited set - Validate, Changed textboxs or on the
form. I see alot of items on the web where others use OnSave or
OnAfterChange, but the code is written in javascript. How do I gain
access to these other events in C#?

Thanks for your time.
 
Z

Zhang Haiguang

Here is a demo:
// NOTE: The following procedure is required by Microsoft Office InfoPath.
// It can be modified using Microsoft Office InfoPath.
public void InternalStartup()
{
EventManager.FormEvents.ViewSwitched += new
ViewSwitchedEventHandler(FormEvents_ViewSwitched);
((ButtonEvent)EventManager.ControlEvents["CTRL5_5"]).Clicked += new
ClickedEventHandler(CTRL5_5_Clicked);
EventManager.FormEvents.Loading += new
LoadingEventHandler(FormEvents_Loading);
((ButtonEvent)EventManager.ControlEvents["CTRL6_5"]).Clicked += new
ClickedEventHandler(CTRL6_5_Clicked);
}
Please add your event handlers to EventManager.FormEvents or
EventManager.ControlEvents.

InfoJet Service
InfoPath Web Form
[http://www.infojetsoft.com]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top