Offline Support in InfoPath: InfoPathHelper 1.1

Jelle has released the long awaited version 1.1 of his InfoPathHelper component! This version fixes a nasty bug that appears when caching data from a web service. Check his latest post for the download and the source code.

InfoPathHelper is a small reusable .NET library you can use to add offline support to InfoPath forms. That's right, you're finally able to make InfoPath a real smart client that is offline capable of submitting forms and querying data sources, without any extra security requirements whatsoever.

For the end user, the form will appear to continue working when the machine is offline or when the target you're submitting your form to is unavailable (a Web Service, a Sharepoint site, ...). The next time the machine goes online, any pending requests will be submitted. The same goes for querying data sources (files on a network share, Web Services, ...): if they're not available, the data will be taken from the local cache until the next time it can be refreshed.

For a developer using the InfoPath 2003 Toolkit for Visual Studio .NET, it boils down to inheriting from the CachingInfoPathForm base class, changing your submittal options to use form code, deleting the messy generated boilerplate code (you get cleaner properties and events for free in stead) and calling a few methods depending on your needs. The following example shows how to enable offline support for a form that has a submit data adapter named "WebServiceSubmit" and a data object named "Countries".

1 Comment

  • Hi, I understand your code.But if I do this ,like I want to create a infopath template using c#,how can I do ? or if I want to add one button to a infopath template which had created.How can I do ? please help me ! Thank you ! My msn:llmandlxr@hotmail.com. I am online every day.

Comments have been disabled for this content.