Current location - Education and Training Encyclopedia - Graduation thesis - Seeking asp.net's thesis
Seeking asp.net's thesis
The Application of ASP.NET in E-commerce Website

Abstract: Many technical characteristics of ASP.NET make it more suitable for developing large-scale distributed Web applications. This paper discusses the design and implementation of ASP.NET e-commerce website through the development of online shopping system.

[Keywords: ]ASP.NET network application e-commerce database

I. Introduction

Today, with the rapid development of the Internet, business websites have become one of the online systems widely used on the Internet. Therefore, we designed an online shopping system to simulate the supermarket, and discussed the application of ASP.NET technology in various aspects.

Second, ASP.NET's technology introduction

ASP.NET not only has the advantages of ASP, but also has powerful functions. ASP.NET completely abandoned scripting languages and replaced them with compiled languages (such as VB and C#), which provided developers with more powerful programming resources. It allows server-side controls to replace traditional HTML elements, and fully supports the event-driven mechanism, providing developers with a powerful integrated development tool to visualize Studio.NET.

Third, the application of ASP.NET in online shopping system

Combine 1 to access the database. ASP.NET and ADO.NET.

In e-commerce, for users, the purpose of online information inquiry is to find the products or services they need. Therefore, it is necessary for Web service providers to let users query the back-end data of services through browsers. In this paper, access to the database is through. NET framework.

The steps for ASP.NET and ADO.NET to access the database together are as follows:

(1) Create a database connection;

(2) Request a recordset;

(3) temporarily storing the record set in the data set; ;

(4) If necessary, return to step (2) (DataSet can accommodate multiple datasets);

(5) closing the data link;

(6) performing required operations on the data set;

Create object SqlConnection

dim Conn As New SqlConnection(" server = localhost; Database = database name; UID= user name when connecting to the database; PWD= password when connecting to the database ")

Dimad pas new SQL data adapter ("select * from the name of the datatable to operate", conn)' creates an adapter object and requests a recordset.

To create a dataset object.

Adp.fill (ds, "table name of corresponding recordset in DataSet")' fills the DataSet and temporarily stores the recordset in dataset.

..... omit the specific database operation code.

Conn.Close ()' closes the data link.

Conn=Nothing' Clear the object.

2. Realization of registration function

Registration enables users' personal information to be entered into the database, and enables users to pass their personal user names and passwords when shopping. After the registration is successful, a Session variable will be set to identify that the user has passed the registration and is a legal user who can shop, for example, session ("flag") = true.

3. Implementation of user login

Registered old users can directly log on to the website to shop. When logging in, just enter the user name and password and submit it to the server. The server will query the customer information base. If there is no such user, it will be redirected to the login interface. If the identity is legal, the login will be marked as successful, and the Session variable will be set, Session(username)= user username. By setting the Session variable, when the user jumps to each page, the program can obtain the user information through the Session. By default, if there is no user request, the server will only keep the session 20 for 20 minutes. At the same time, you can also set the property Timeout of Session to change this length of time, or you can forcibly destroy the Session through session. Give up to log off the user.

4. Commodity display

Commodity display includes commodity pictures, commodity categories, commodity names, detailed descriptions of commodities, commodity origin, etc. The information of these commodities is stored in the "product" data table in the background data. In order to store pictures in the database, the pictures of products can be stored in a fixed directory on the server, and the values of fields in the table are filled as the storage paths of pictures, thus completing the storage and management of pictures. Because we want to display pictures on the page, in order to enhance the effect, the picture format used is GIF. The concrete realization of commodity display is realized by reading the "product" data table in the background data through the Repeater control. With the help of table form, in the corresponding cell, the picture can be displayed in the corresponding position by marking. At the same time, when displaying the product name, you can also add hyperlinks to the specific information page of the product in the following ways:

Four. Concluding remarks

This paper discusses the application of ASP.NET in the practice of e-commerce website construction from the perspective of software design, which has good practical value. This method can also be extended to other large, medium and small chain sales enterprises to build e-commerce systems. Of course, this system still has its shortcomings, such as internet security, logistics distribution conditions, consumer credit rating, CA certification and so on.

References:

Tang Wei Hu Zhiyong Qian Jun NET technology research in website development [J]. Journal of Liaoning University of Science and Technology, 2005, (02)

[2] Tan Mingjia: Optimization Analysis of Web Programs Based on ASP.NET [J]. Computer and Modernization, 2005, (03)

[3] Huang Ying Xie Zhong: ASP.NET and SQLServer technology in the development of dynamic websites [J]. Computer Knowledge and Technology, 2004, (35)

[4] Zheng Tao: Research and Implementation of Web Access Database Based on ADO.NET Technology [J]. Computer and Modernization, 2005.