Review:
1. Analysis of QBlog technology principles in the autumn Garden: Opening part: Overall understanding (1) -- introduces the role of the overall folder and file
2: Analysis of QBlog technical principles of the autumn color Garden: Understanding the whole site processing process (2)-introducing the business processing process of the autumn color Garden
3: Analysis of QBlog technical principles in the autumn color Park: UrlRewrite's principle of URL without a suffix (3) -- introduces how to implement URL without a suffix
4: Analysis of QBlog technical principles in the autumn Garden: URL redirection System of UrlRewrite (4) -- introduce how to locate the processing program in the URL
5. Technical Principles of QBlog in the autumn color Park: Module-based page base class design (5)-Introduction to creating base classes and custom lifecycles
6: Analysis of QBlog technology principles in the autumn Garden: Module Page Base-Lifecycle Process (6)-Introduction to internal services of the basic Lifecycle
7. Technical Principles of QBlog in the autumn Garden: Module-based lifecycle-page loading (7)-Introduction to html Loading Principles
8. Technical Principles of QBlog in the autumn Garden: webpage processing-content filling (8)-How to fill html content
9: Analysis of QBlog technology principles in the autumn Garden: unique multi-language translation mechanism (9)-Introduction to the principles of html multi-language translation
10: Analysis of Technical Principles of QBlog in the autumn Garden: demo of page content filling and multi-language translation process (10) -- Summary DEMO code
Appendix:
1: Analysis of QBlog technical principles of the autumn color Garden: technical implementation of one-click blog Installation Tool [Download source code] -- Principle of the open source autumn color garden Installation Tool
2: how to install and deploy the CYQBlog site of the autumn Garden
3: how to install and deploy the CYQBlog site of the autumn Garden in Windows 7
Ps: QBlog: Http://www.cyqdata.com/download/article-detail-427
Previous sections:
After several days, due to the recent efforts to increase the QBlog optimization of the autumn color garden and some things of the autumn open source team, the write speed was slower. continue today:
In the previous sections, We have mainly published the summary and demo examples in the previous 10 sections. We have also opened up the QBlog backend management system and one-click Installation Tool for the autumn color garden. If you are interested, you may wish to study it, I believe we can still find some different ideas.
This section will continue to lead the way to unveil the Post Submission mechanism of QBlog in the autumn garden.
Start:
The Post Submission mechanism of QBlog in the autumn garden is actually very simple: 1: place a hidden domain in the Form in html. 2: When the Form is submitted to the background, the Post event is distinguished and triggered by hiding the agreed name and value of the domain. 3: In a custom life flow, the process is simple and relevant.
I. Post Processing Mechanism in a custom Process
First, a picture that has been used several times:
Note:
This is the second life cycle in the Custom life process of QBlog in the autumn Garden. The Post trigger mechanism is here.
OnPost: protected virtual void OnPost () {}. This is a virtual function that will be overwritten and processed by various pages.
Before calling this function, there are several minor judgments and a special PostBufferOK function.
PostBufferOK: This is a buffer mechanism. In addition to secondary submission prevention, it also provides a certain range of second-kill code submission functions.
PS: In the past, it was often found that foreigners often sent comments with links to the QBlog in the autumn garden, which showed that foreigners also had this hobby.
2. hidden fields corresponding to the interface
Basic html:
<Form method = "post" enctype = "multipart/form-data">
<Input type = "hidden" name = "myAct" value = "Setting"/>
... Then there are some submitted text boxes and a submit button. The description with enctype includes the upload function.
</Form>
Note:
The name convention of the hidden domain is "myAct", which corresponds to the background, while "value" is left to the handler as the corresponding branch. After you click a submit button to submit, in the above custom lifecycle process, and then to the specific page below for processing.
Iii. ASHX processing program
Take a lookQBlogIn the article comment, how to handle the submission event:
Note:
Based on the value of the hidden field, use switch to differentiate event processing. How can I obtain the submitted value? Answer: Request [Control name]
Summary:
This section briefly introduces the Post Submission mechanism of QBlog in the autumn garden. At this point, the overall mechanism of QBlog in the autumn garden is similar. If you are interested, you can take a good look at this series of articles.
The series is not complete yet, and the highlights are still coming soon. Stay tuned!