TAILIEUCHUNG - Beginning ASP.NET 2.0 E-Commerce in C# 2005 From Novice to Professional PHẦN 7

Whew, bạn đã viết rất nhiều mã để kiểm soát này. Các mã chính nó không phải là phức tạp, nhưng bạn đã phải đối phó với rất nhiều các yếu tố giao diện người dùng. Hai chi tiết quan trọng để hiểu được như sau: • Bạn sử dụng phiên để lưu lại các dữ liệu về thứ tự lựa chọn. | CHAPTER 10 DEALING WITH CUSTOMER ORDERS 399 9. Switch to Source View and disable the view state for the instance. Change its name from OrderDetailsAdmini to orderDetailsAdmin asp GridView br uc1 OrderDetailsAdmin EnableViewState false id orderDetailsAdmin runat server uc1 OrderDetailsAdmin span asp Content How It Works Whew you ve written a lot of code for this control. The code itself isn t complicated but you had to deal with a lot of user interface elements. The two important details to understand are as follows You used the session to persist data about the selected order. This is read in the OrderDetailsAdmin control to obtain the ID of the selected order. You used Page_PreRender instead of Page_Load because it executed after the session gets the chance to be updated in the parent form. Because we talked about each method while writing the code it should be pretty clear how the page works. Run it now and play with the buttons to make sure everything works as it should. Summary We covered a lot of ground in this chapter. You implemented a system by which you can both take orders and manually administer them. You accomplished this in two separate stages. You added a Proceed to Checkout button onto the shopping cart control to allow the visitor to order the products in the shopping cart. You implemented a simple orders administration page where the site administrator could view and handle pending orders. In addition we looked at the use of validation controls and also importantly set the scene for entirely automating the order system. Because order data is now stored in the database you can create various statistics and run calculations based on the items sold. In the next chapter you ll learn how to implement a Visitors who bought this also bought . . . feature which wouldn t have been possible without the order data stored in the database. CHAPTER 11 Making Product Recommendations One of the most .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.