Think
1. Use tools such as DW-MX to generate a template of the HTML format, add special tags (such as $ HTMLFORMAT $) where you need to add formats, dynamically generate files to read this template when you use the code, then get the contents of the front desk, Add to this template's tag position, generate a new file name and write the disk, and 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.
advantage
1. You can create a very complex page, using methods containing JS files, join the document.write () method in the JS file can be added to all pages, advertising, etc.
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.
Disadvantage
Idea 2: If you use hard-coded way, 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
Library code
1. Define (Template.htm) HTML Template Page
hEAD>
{ String line; WHILE ((line = sr.readline ())! = null) { HtmlText.Append (line); } sr.close (); } } Catch { |