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.