Chapter 14. Real-World Tasks and Coding Examples

The last few chapters have provided enough examples for you to get an idea of how to work with the development environments that are available. Simple routines were used to show how to use events and the object model of InfoPath using scripting and managed code in .NET. Now it is time to show some more routines that you will probably find a use for in your applications. To show how to create these routines, examples will be given using both scripting and C#, so that you can have options in both development environments.

There are some techniques that come in handy when creating InfoPath forms. For instance, InfoPath doesn't provide functions or controls for handling dates, such as adding days or months, or displaying the difference between two dates. Also, how do you send an e-mail within an InfoPath form? These are a couple of the real-world examples that you will find in this chapter. In this chapter you will:

  • See a simple way of displaying dates using scripts.

  • See a more complete, and cleaner, way of displaying dates on a form using C#.

  • Send a form via e-mail using code.

  • Learn about how to provide context-sensitive help for your forms.

Get Beginning InfoPath™ 2003 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.