ASP.NET Dynamically generates HTML Page This feature is available for Web sites that are not strong in the background database, that is, most of the text is not stored in the database, but placed in an HTML file or XML file, just put the index into the database. Such as articles title, category, query keywords, etc. This is suitable for a web site that does not have database support such as MS SQL Server such as MS SQL Server. Suitable for news distribution systems, such as Sina, 163, etc., are dynamically generated by HTML pages, and facilitate search engine optimization. Suitable for programs that require dynamic custom pages. For example, forum, chat room, etc. You can load custom HTML pages to strengthen your appearance. Idea 1. Use tools such as DW-MX to generate templates, add special tags (such as HTMLFORMAT) where you need to add formats, dynamically generate files, read this template, then get the contents of the front desk, add In the tag position of this template, the new file name is generated and written to the disk, and then write related data to the database after writing. 2. Use the background code hard to encode the HTML file, you can use the HTMLTextWriter class to write the HTML file. Advantages 1. You can create a very complex page that uses methods containing JS files, adding the document.write () method in the JS file, you can add content such as page, advertisement, etc. in all pages. 2. Static HTML file Use the MS Windows2000 INDEX Server to establish a full-text search engine, using ASP.NET to get search results in a DataTable method. The Win2000's INDEX service cannot find the content of the XML file. This search feature will be very powerful if the database search is included with the INDEX index. 3. Save the server's load, request a static HTML file to save a lot than an ASPX file server resource. Disadvantages II: If you use hard coding, the workload is very large, you need a lot of HTML code. Difficulties in debugging. Moreover, the HTML style generated by hardcod cannot be modified. If the site is replaced, then you must re-encode, bringing huge effort to the later period.
So this is the first idea of the first idea. 1. Definition (TEMPLATE.HTM) HTML Template page