TAILIEUCHUNG - Beginning C# 2005 Databases PHẦN 5

Tạo ra một lệnh gọi thủ tục lưu trữ hiện có trong cơ sở dữ liệu, tham số hoặc không. Nên cẩn thận đây để sử dụng một thủ tục lưu trữ trả về không có kết quả hoặc một giá trị duy nhất, nếu không bạn không thể dự đoán những gì bạn sẽ nhận được một giá trị trả về. | Chapter 5 How It Works The configuration and formatting of the controls in this example hardly needs much comment the procedure was nearly identical to that used in list views in the preceding section. It is however worth scrutinizing the result in a little more detail. First note the field specification for the DetailsView control asp DetailsView . . Fields asp BoundField DataField Species HeaderText Species SortExpression Species asp BoundField DataField Description HeaderText Description SortExpression Description asp CheckBoxField DataField Immortal HeaderText Immortal SortExpression Immortal asp CommandField ShowDeleteButton True ShowEditButton True ShowInsertButton True Fields . asp DetailsView The code used here is similar indeed to the column specification for the GridView control. As with that control it isn t necessary to specify template details for editing items the controls required are instead inferred from the controls used in the field specification section. In addition you can see where the command buttons are specified in the CommandField control. You can change the text displayed for these commands or use images instead by modifying this specification. Also examine the code in the templates specified for the FormView control for example EditItemTemplate EditItemTemplate Species asp TextBox ID SpeciesTextBox runat server Text Bind Species asp TextBox br Description asp TextBox ID DescriptionTextBox runat server Text Bind Description asp TextBox br Immortal asp CheckBox ID ImmortalCheckBox runat server Checked Bind Immortal br asp LinkButton ID UpdateButton runat server CausesValidation True CommandName Update Text Update asp LinkButton asp LinkButton ID UpdateCancelButton runat server CausesValidation False CommandName Cancel Text Cancel asp LinkButton EditItemTemplate This also looks familiar the code is almost identical to that used in the analogous DataList control template used in the previous Try It Out apart from a few minor cosmetic .

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.