TAILIEUCHUNG - Beginning asp net 2.0 with c phần 4

Và trang web sẽ tự động hiển thị danh sách mới của các cầu thủ trong đội mà bạn không cần phải sửa đổi các lớp trình bày. Phấn đấu cho một cái nhìn nhất quán và cảm thấy trong trang web. Bằng cách giữ cùng một màu sắc, logo, và bố trí trên màn hình, bạn phát triển một cảm giác về sự hiện diện. Trung thành theo | Events and Code else startYear - 1 endYear Next you create the actual start and end dates of the season using the start and end year already set seasonstart new DateTime startYear 8 20 20th August seasonEnd new DateTime endYear 5 31 31st May Now you check to see if the current date falls within the season start and end dates. If it does you set the Cancel property of the parameter e to true so when the event procedure ends the event action the delete will be cancelled. You also display a message to tell the user that players cannot be deleted during the season if today seasonStart today seasonEnd true Cannot delete players during the season If you are outside of the season players can be deleted so you simply clear any message and rebind the grid so that the deleted player doesn t still show in the grid . Because you haven t set the Cancel property of parameter e to true it is false by default the action will take place and the player will be deleted So what you ve seen here is that some events can be cancelled which allows you to build logic into your applications enabling you to control the actions that are run. This also means that events that you think will run might not. For example it was mentioned earlier that some of these events are paired. So as well as the Deleting event there is a Deleted event and if you cancel the Deleting event the Deleted event isn t run. The logic of this is shown in Figure 6-21. This process is also the same for inserted and updated items where the Inserting and Updating event procedures are used. In all three cases you can set the Cancel property of the parameter to true to cancel the event. 199 Chapter 6 FirstName Chris LastName Christopher Position Left Back PictureURL Date Joined Date Left Edit D New Figure 6-21 Global Events So far in this chapter you ve seen that events are raised by controls or by pages but there is a third type of .

TỪ KHÓA LIÊN QUAN
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.