InfoPath 2010 Cookbook 3

101 Code Recipes for C# Developers


How to Purchase

Paperback Edition of InfoPath 2010 Cookbook 3 ($49.95) + Get bonus solutions online


Available on Amazon (also available on Amazon.co.uk and Amazon.de)

and

Available on CreateSpace

 

Who is this book for?

InfoPath 2010 Cookbook 3 is for C# developers who have already mastered the basics of designing form templates in InfoPath 2010 without writing code and who now want to extend the functionality of InfoPath 2010 forms through code.

This book is NOT for InfoPath users who cannot already read and write C# code, since it does not teach C# from the ground up.

The level of this book ranges between beginner and advanced and it is ENTIRELY ABOUT WRITING CODE!!!

What is this book about?

InfoPath 2010 Cookbook 3 extends the skills acquired from InfoPath 2010 Cookbook: 101 Codeless Recipes for Beginners by showing you how to start writing C# code for InfoPath 2010 forms to access and manipulate data within forms.

InfoPath 2010 Cookbook 3 then moves on to explore more complex and advanced topics that combine InfoPath programming with web services, databases (Access and SQL Server), Word, and SharePoint.

InfoPath 2010 Cookbook 3 is comprised of:

  • 60% basics of writing code for InfoPath 2010 forms
  • 40% solutions for integrating InfoPath 2010 with web services, databases, Word, and SharePoint 2010
  • 101 step-by-step tutorials or solutions that have a Problem-Solution-Discussion format

If you are looking for an InfoPath 2010 with VB programming book, have a look at InfoPath 2010 Cookbook 4. InfoPath 2010 Cookbook 3 is the C# version of InfoPath 2010 Cookbook 4, so everything you can do with VB you can also do with C#.

What will this book do for you?

InfoPath 2010 Cookbook 3 will teach you how to:

  • Configure InfoPath Designer 2010 for writing code
  • Start to write C# code for InfoPath 2010 forms in Visual Studio Tools for Applications
  • Write C# code to manipulate form data and controls
  • Write C# code to access InfoPath forms from external components
  • Write C# code to connect to and perform CRUD operations on a Microsoft Access database
  • Write C# code to integrate InfoPath with Word 2010
  • Write C# code to integrate InfoPath with web services (and SQL Server)
  • Write C# code to integrate InfoPath with SharePoint 2010

Note: The last 4 chapters of InfoPath 2010 Cookbook 3 require you to have Visual Studio 2010 installed and to know how to use it.

See the titles of all 101 recipes in the full table of contents of the book.

What can you do next?

You can get InfoPath 2010 Cookbook 3 at Amazon or CreateSpace (an Amazon company)

OR

You can watch demo videos (one of which is shown below) of a few of the InfoPath form solutions that InfoPath 2010 Cookbook 3 teaches you how to create.

Recipe 90/91: Submit/retrieve an entire InfoPath form to/from SQL Server




 

Full Table of Contents

Chapter 1: Getting Started
1. Install Visual Studio Tools for Applications
2. Set or change the form template code language to C#
3. Create a new C# project for a form template
4. Remove code and project files from a form template
5. Associate a form template with an existing C# project

Chapter 2: Basics of Programming for InfoPath
6. Add an event handler for a form event
7. Add an event handler for a control event
8. Access the Main data source of a form
9. Access a secondary data source of a form
10. Get the value of a field
11. Set the value of a field
12. Clear a field on a form
13. Clear all fields on a form
14. Add error-handling to an InfoPath form
15. Debug code of an InfoPath form template in VSTA

Chapter 3: Views
16. Switch to show a specific view when a form opens
17. Switch to a read-only view when a form is submitted
18. Save form data to a PDF file on disk

Chapter 4: Data Validation
19. Validate a field when its value changes
20. Validate a field when a button is clicked
21. Check for a specific error in a form
22. Clear a specific validation error in a form
23. Ignore and clear all errors in a form before submit

Chapter 5: Controls
24. Retrieve design information for a control on a view
25. Hide or disable a control
26. Set the value of a decimal field
27. Validate that data entered is a decimal number
28. Display the current time in a text box on a form
29. Embed HTML in an InfoPath form
30. Add a line-break to a rich text box
31. Clear a rich text box
32. Validate that a rich text box has no more than 5 lines
33. Select an item in a drop-down list box
34. Populate a drop-down list box
35. Select or deselect a check box
36. Select a specific option from a list of options
37. Get the value of a date and time picker control
38. Set the value of a date and time picker control
39. Calculate the difference between two date pickers
40. Select an item in a multiple-selection list box
41. Deselect an item in a multiple-selection list box
42. Select all items in a multiple-selection list box
43. Deselect all items in a multiple-selection list box
44. Validate that at least 3 items have been selected in a multi-select list box
45. Add an item to a bulleted list
46. Remove all items from a bulleted list
47. Set the (default) value of a person/group picker control
48. Get the selected user(s) from a person/group picker
49. Retrieve profile information for a user selected from a person/group picker
50. Clear a person/group picker control
51. Load a file from disk into an attachment control
52. Load a resource file into an attachment control
53. Save a file from an attachment control to disk
54. Rename a file in an attachment control
55. Restrict the size of a file in an attachment control
56. Restrict file types for a file in an attachment control
57. Delete a file from an attachment control
58. Load an image from disk into a picture control
59. Load an image resource file into a picture control
60. Load an image from the web into a picture control
61. Load an image as a link into a picture control
62. Extract an image from a picture control
63. Extract the file extension from a picture control
64. Validate the size of an image in a picture control
65. Clear a picture control
66. Add or remove an optional section when a check box is selected or deselected
67. Add a choice section when a form opens
68. Add a choice section based on a selected option
69. Retrieve a row of a repeating table
70. Loop through rows of a repeating table
71. Add a row to a repeating table
72. Delete rows of a repeating table
73. Retrieve the value of a field in the same row of a repeating table
74. Copy data from a data source to a repeating table
75. Sort rows of a repeating table
76. Filter rows of a repeating table

Chapter 6: Working with InfoPath Form Data
77. Sequentially traverse all fields of a form
78. 3 Ways to open and read an InfoPath form in memory
79. Programmatically create an InfoPath form
80. Convert a form to Word using the Open XML SDK 2.0

Chapter 7: Web Service Integration
81. Create a web service that retrieves data for InfoPath
82. Submit form field values to a web service
83. Submit repeating table data to a web service
84. Submit an entire form to a web service
85. Retrieve return values after data has been submitted to a web service

Chapter 8: Database Integration
86. Perform a wildcard search on an Access table
87. Retrieve data from an Access table with Memo field
88. Perform create, update, and delete actions on an Access table with Memo field
89. Retrieve data from SQL Server using a stored procedure
90. Submit an entire InfoPath form to SQL Server
91. Retrieve an entire InfoPath form from SQL Server

Chapter 9: SharePoint Integration
92. Add an item to a list using the SharePoint client object model
93. Populate form fields from query string parameters
94. Select and add files from a document library as attachments to a form
95. Submit repeating table data to a SharePoint list to create new list items
96. Submit a form to libraries on two different sites in the same site collection
97. Use an InfoPath form to add a recurring all day event to a SharePoint calendar
98. Use an InfoPath form to upload a file to a SharePoint document library
99. Auto-number InfoPath forms in a form library
100. Use an InfoPath form to send an email with attachments
101. Save a form as a PDF document in a SharePoint document library


 

Bonus: Get more InfoPath code solutions in the InfoPath 2010 Cookbook 3 Club, a private area for customers who have bought InfoPath 2010 Cookbook 3.



Available on Amazon (also available on Amazon.co.uk and Amazon.de)

and

Available on CreateSpace

InfoPath 2010 Cookbook 3

PAPERBACK

ISBN: 978-1469988016
Publication Date: Mar 2012
Author: S.Y.M. Wong-A-Ton
Page Count: 478
Language: English