Dreamweaver UltraDev creates a News system for generating static pages

Source: Internet
Author: User

Preface

"News system" seems to be the first lesson for all the friends who learn Dreamweaver UltraDev (hereinafter referred to as UD !!! We have another news system today! Everyone will do it! Today, I want to tell you how to generate a static *. htm page News system!

What is the so-called static page News system? Let's take a look at the Sina news page at http://news.sina.com.cn/c/2002-05-23/1558584195.html. How does this address end with *. htm? What we do with ASP, is not all like http://news.sina.com/news.asp? Is the ID = 242553? Are Sina News manually added ?" A friend in the forum asked. The answer is certainly not (if so, Sina's background management personnel should be short in typing, haha )! In fact, the news is still added in the form of a database, but the FSO ("FileSystemObject" is what we call the File Access component) is used at the same time to write the database content as static *. what are the benefits of doing so on the htm page? When the website traffic is too large, our ASP is too busy. A large number of database queries will make our servers unable to afford it. If all the requests are static pages, the server load is greatly reduced, and the speed is certainly faster!

Well, I'm not a little interested. Let's talk about the program requirements and key points of production:

1. Server system: win2000 IIS5.0 or IIS4.0 (strongly recommended );
2. Your system or remote server must support FSO (FileSystemObject file read/write );
3. In program creation, we should learn to separate the code produced by UD (which also allows us to understand the code that UD is "horrible );
4. Some hand-written code, combined with the UD code, should be noted by friends who have never opened a code window );

OK! Ready! Let's get started!

Part 1: Add News

1. Page list. In this simple news system, we need to use the following page: add. asp (add news), browse. asp (news browsing), del. asp (delete news), example_updata.asp (modify template), save.asp(save news], OK .htm (success page), updata. asp (modify news), updata_save.asp (save changes)

2. Prepare the database. Create a database (Access2000 is used here) File: asp2htm. mdb, create two tables: T_News, T_Example, as shown in the figure:

<

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.