Recently studied a news system to find information about ASP.NET to generate HTML 1. Use tools such as DW-MX to generate templates in HTML format, add special tags (such as $ htmlformat $), dynamics in places where you need to add formats ( When generating files, use the code to read this template, then get the contents of the front desk input, add the new file name, and write the disk after the new file name is generated, and the related data is written 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