murachs asp net 4 web programming with vb 2010 phần 2

. (Nhận xét của một nhà phát triển trên phiên bản trước của murach, được đăng trực tuyến) Đã biết làm thế nào để mã trong Visual Basic 2010? Sau đó, tổng thể lập trình web với phiên bản 4. NET của cuốn sách | Chapter 2 How to develop a one-page web application 67 Common page events Event Procedure name Occurs when. Init Pagejnit A page is requested from the server. This event is raised before the view state of the page controls has been restored. Load Page_Load A page is requested from the server after all controls have been initialized and view state has been restored. This is the event you typically use to perform initialization operations such as retrieving data and initializing form controls. PreRender Page_PreRender All the control events for the page have been processed but before the HTML that will be sent back to the browser is generated. Common control events Event Occurs when. Click The user clicks a button link button or image button control. Textchanged The user changes the value in a text box. CheckedChanged The user selects a radio button in a group of radio buttons or selects or unselects a check box. SelectedlndexChanged The user selects an item from a list box a drop-down list a check box list or a radio button list. Code for the Click event of the btnClear button Protected Sub btnClear_Click ByVai sender As Object ByVai e As Handles 50 End Sub Description All of the events associated with an web page and its server controls are executed on the server. Because of that the page must be posted back to the server to process any event for which you ve coded an event handler. When a page is posted back to the server the Init and Load events are always raised so any event handlers for those events are run first. Next the event handlers for any control events that were raised are executed in the order they were raised. When these event handlers finish the PreRender event is raised and any event handler for that event is run. Figure 2-18 How to use page and control events Download from Wow eBook 68 Section 1 .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
97    324    1    09-05-2024
Đã 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.