【Abstract】 Use the website news management system developed by ASP.NET and ADO.NET technology to realize the dynamic management of website news, so that the management of information is more timely and efficient, and work efficiency is improved. At the same time, the system development principle, the functional characteristics and design plan of the system are introduced. [Keywords] ASP.NET ADO.NET News Management Database With the popularity of the Internet, more and more companies have established their own WWW sites, companies can show products through the website, release the latest news, communicate with users, and communicate with users. Establish contact with partners, and carry out e-commerce. Among them, the news management system is an important part of the enterprise website. It is responsible for double-layer role. On the one hand, it can be used to dynamically release the new product or new development project. On the other hand, it can promptly announce business performance, technology to customers. Engineering projects, products and services, special recommendations or preferential projects, which attract customers to expand customer groups. Traditional website news management methods have two, one is a static HTML page, update information, you need to re-create the page and then upload the page and modify the corresponding link, this way because the efficiency is too low. Second, based on ASP and scripting languages, combine dynamic web pages and databases, process news through applications, which is currently a popular practice. However, due to the limitations of the ASP itself, there is some non-overcoming defect, and the system performance of ASP.NET technology has been improved, which is mainly manifested in the following aspects: 1. Since the ASP page must be interpreted after each opening, the page does not have any improvement at the time of repeated open, and the ASP.NET page only needs to be recompiled after compiling until the page is modified or web application. The program is restarted. This makes it greatly improved at multiple visits. 2. Since the ASP does not provide any output data as the content, you can only read the record by means of the ADO's RecordSet object when using the ASP to write the database page, and the ASP.NET can be directly and Database contact. 3. ASP.NET supports real-time updates for applications. The administrator does not have to turn off the web server or even stop the application's run can be updated. The application file will never be locked, so the file can be overwritten even when the program is running. When the file is updated, the system is gently converted to a new version. 4. ASP.NET takes the code to write code to make the code easier to write, more clear structure, reduce the complexity and cost of the development and maintenance of the system. 1 Development Principle of System 1. System Structure Model Based on ASP.NET Technology ASP.NET structure is a three-layer system: the UI layer, the business logic layer, and the data layer, as shown in Figure 1.
Figure 1 ASP.NET System Structure Model UI Layer is responsible for interacting with the user, receiving the user's input and presents data from the server to the customer. The business logic layer is responsible for receiving the request from the browser and transmits the request to the data layer while sending the request processing result to the browser. It consists of web forms, XML Web services, and component services. The web form is the core of the ASP.NET application, which is the basis for presenting data and information to the customer, but also the basis for responsive and processing the information and data generated by the client and the displayed web form. The data layer provides data services to the transaction logic layer via ADO.NET manipulation data, such as storage data operation results, returning data search results. 1.2 ADO.NET Access Database Connect to the database, ADO.NET provides the following three ways: connected to the OLEDB; directly connected to SQL Server. Three ways due to the difference in application hierarchies, the efficiency is low to high, and independence is low. For data processing of the connected database, there are two ways, that is, one is to isolate the heterogeneous data source by DataSet, and the other is to read the data source (DataReader mode) in a stream. Traditional applications are designed by maintaining a connection during the entire running process of the program first by establishing a connection to the database. ASP.NET has taken the data structure of disconnecting. When the browser requests a web page to the web server, the server handles this request and sends the requested web page to the browser, and the connection is disconnected until the browser issues the next request. Another innovation of ADO.NET introduces a Dataset. A dataset is a cache that provides a data relationship diagram in memory. Data sets do not know about the data source, which can be generated by a program or by transferring data from a data warehouse. Regardless of where the data is obtained, the data set is operated by using the same program template and it uses the same potential data buffer. 2 Functional Design of System 2.1 Systems The functional structure of the system This news management system can run on the Windows 2000 Server operating system platform, the web server is IIS, the database server is Microsoft SQL Server2000, and the development tools adopted by Microsoft Visual Studio .NET and Dreamweaver. Figure 2 shows the functional configuration of the system. Its workflow is: User login passes permission judgment, ordinary users can only browse, read and query news, and registered users can enter the news management module for news entry, modification, and delete operations in addition to the operation of ordinary users. Registered users can only delete the news that you entrunly in addition to the system administrator. 2.2 Features of the system (1) Simple operation, interface friendly: Fully controlled page layout, make the news entry work easier; many options include the news category, the source department, etc., you can complete; in addition, tracking The prompt information also allows users to clear their operations at any time. (2) Immediately visible: Treatment of news (including entry, modification, deletion) will immediately display the "instant release, instant effective" functionality to "instantly publish, instantly see" immediately.
Figure 2 System Function Structure Figure (3) Functional Perfection: All aspects of news management of common sites: news entry, browsing, deletion, modification, search, etc., fully realize the management requirements for instant news. (4) Convenient transplantation: For different companies, you can develop a website news management system that suits the company's characteristics! 3 The main function of the system's detailed design system is achieved by several functional modules. The specific design process is as follows: (1) System login: This module is responsible for dividing users into ordinary users and registered users to implement user permissions. (2) News Browse: This module is responsible for page out the information of all the news of the website, including the title, type, source department field, and release date, each news title is made into a hyperlink, click on them to jump the page for news reading . (3) News reading: Click the title link in other pages to enter the news reading page. At this time, the details of each news will be taken out, including content, title, keyword, etc., and place it in a relatively fixed format. Region, all news uses roughly the same page layout, only the contents of the respective fields are different, and other locations can be dynamically placed, such as website flag logo, page advertisement banner, etc. can be easily implemented Photo effect. ⑷ News Query: This module provides news query features, and the content that is entered to find and selecting the classification information quickly finds the eligible news and outputs the results of the query. ⑸ News Management: This module is responsible for the registered users who have been registered by the list of registered users who have released and unlealed, and users can delete and modify the news. Non-press publishers do not have processing permissions for the news, so different users will display different contents outside the system administrator. ⑹ News Entry and Modification: Registered users Enter the content required by news, including headings, keywords, types, sources, publishing date, etc., and get the user name from the login module, which will be written to save in the database. The module is also responsible for updates in the editing state, at this time, it will initialize the page control based on the obtained title field value. The following is given as an example to give the main events and functions as an example, indicating the development process of the system.
// IsReguserok function: Determine if the user has registered and password to correct public bool isreguserok () {string name = textBoxName.Text.trim (); string pwd = textBoxpassword.text.trim (); // Establish / open Database connection SQLConnection Conn = new sqlConnection (); conn.connectionstring = "server = (local); uid = sa; pwd =; dataBase = jxdb"; conn.open (); // Established SQL string string sql = "SELECT * from REG WHERE Name = '" Name "' "; SqlDataReader DR; SQLCommand CMD = New SQLCOMMAND (SQL, Conn); DR = cmd.executeReader (); // Reserved User Registration or No Bool IsReguseRexist = Dr.Read (); // Close DataReaderdr.close (); // String Sqlboth = "Select * from reg where name = '" name ""; SQLBoth ""; SQLBoth ""; SQLCOMMAND cmdboth = new sqlcommand (sqlboth, conn); SqlDataReader DRBOTH; DRBOTH = cmdboth.executeReader (); // Reserved user name password simultaneous information BOOL ISBOTHEXIST = DRBoth.Read (); // Turn DataReaderDrboth.close (); conn .Close (); // determine if the user registers if (! IsReguseRexist) {response.write ("This user has not been registered! ')"); Return False;} // determined whether the username and password Uniform else if (! IsbotHexist) {response.write ("