InfoPath Development Combat (1): Introduction

Source: Internet
Author: User
Tags web services client visual studio

InfoPath is a new member from Office 2003 and, simply put, it is a form design and filling software. We can quickly design a form using many of the layout and controls that InfoPath provides; You can use rules to perform actions based on conditions, use data validation to validate the legality of the input, use conditional formatting to control the appearance of the control, use a formula to dynamically get or calculate the value of a control, or from a Web Data from external data sources, such as Services, SharePoint, XML files, SQL Server databases, and Access databases, and apply to forms.

InfoPath, on the other hand, uses XML as a data carrier and renders data in XSL, which makes InfoPath forms more flexible. When the data in the form is changed, the formula that references the data is evaluated immediately. Also, with InfoPath forms Services, InfoPath forms can be rendered on a Web page and can be filled out in a browser from the client. Although InfoPath forms that can be browsed on a Web page are subject to some restrictions, their main features are not limited.

InfoPath has an excellent code-free design capability that allows it to quickly design forms and put them into use. If these features still do not meet your needs, you can also match Visual Studio to develop form templates that contain code. Because InfoPath uses XML as a data carrier, we don't need to learn a lot of InfoPath object models, and in fact, most of the time we write code that uses XPath to manipulate the InfoPath DOM.

When will you need to develop a form template that contains code? For example, when designing a form, you use a data connection to get the data, however, InfoPath's data connections cannot be modified in a code-free manner. If you need to use the user's input as a parameter to a Web services or SQL query, you need to add code to handle it.

There are two ways to develop InfoPath that contains code: VSTA and VSTO, and we can choose to use that type of development based on the actual situation.

The full name of VSTA is visual Studio Tools for applications, a development method that InfoPath provides, checking InfoPath when installing InfoPath. NET programmable support will install VSTA. Using VSTA for InfoPath development, simply selecting Edit form code in the appropriate location will automatically start or go to the appropriate location in Visual Studio. The InfoPath form template developed by VSTA requires the support of the. NET Framework 2.0.

The full name of VSTO is Visual Studio Tools for Office, a set of project templates that is provided by Visual Studio 2008 to develop Office-related applications. There are two main differences between VSTO and VSTA:

Using VSTO to integrate the InfoPath designer into Visual Studio, you do not need to open the InfoPath client software when you develop an InfoPath form template using VSTO.

The InfoPath form targets developed by VSTO require the support of the. NET Framework 3.5.

I personally prefer the unified interface development experience that VSTO brings, so this series of articles will use VSTO for example development.

This series of articles will begin by describing the data connections that InfoPath supports, and how to extend them using code.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.