Research on infoview form conversion (infopath-> aspx)

Source: Internet
Author: User
Infoview The function is to convert Microsoft infopath forms into aspx forms, which is simple and practical.


 Open after installationHttp: // localhost/infoview/To try it out.

1. upload an xsn file.

2. Start conversion and prompt that the conversion is successful.

III: Browse. Enter the submission form.


Is it incredible?

I roughly looked at its implementation method.
The first step is to unpackage infopath during the upload process, and then use the string replacement method to replace the form elements in infopath:
Plaintext and so on are replaced with form elements for Web pages. Some infoview identifiers and data verification are added during the replacement process for future data processing.
For example, plaintext in infopath is replaced with the following format. < Input ID = Infoview_id26 Onclick = "Infoview_onclick (this, 'infoviewform1 ');" Onchange = "Infoview_updatexmlfield (this, 'infoviewform1 ');" XD: infoviewid = "Id26" XD: Binding = "Id26" XD: xctname = "Plaintext" XD: ctrlid = "Submittedbyemailaddressprimary_1" >

Pay attention to the aboveOnchange = "infoview_updatexmlfield (this, 'infoviewform1 '),This function is used to update the XML data island on the webpage from time to time when the form item changes.
After replacement, the aspx file is generated. The generated form elements are all client controls, rather than server controls such as <asp: textbox>.
All subsequent data operations are completed using JavaScript in combination with the XML data Island. (See the three XML data islands)


Where can I submit the entered data? The answer is the XML file.

In general, infoview basically implements the conversion from infopath to Aspx. However, infoview cannot define the processing after the form is submitted.
The generated XML file. If you want to specify the data to be submitted to the database, you need to implement the conversion by yourself.


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.