TAILIEUCHUNG - ASP.NET 4 Unleased - p 170

Building Templated Databound Controls LISTING void Page_Load() { if (!) { = “Laptop”; = ; (); } } protected void ProductForm1_ProductUpdated(object sender, EventArgs e) { = [“Name”].ToString(); = [“Price”].ToString(); } Show ProductForm | 1664 CHAPTER 37 Building Templated Databound Controls LISTING @ Page Language C @ Register TagPrefix custom Namespace myControls DOCTYPE html PUBLIC - W3C DTD XHTML Transitional EN http TR xhtml1 DTD script runat server void Page_Load if Laptop protected void ProductForm1_ProductUpdated object sender EventArgs e Name .ToString Price .ToString script html xmlns http 1999 xhtml head id Head1 runat server title Show ProductForm title head body form id form1 runat server div custom ProductForm id ProductForm1 Runat server OnProductUpdated ProductForm1_ProductUpdated EditItemTemplate asp Label id lblName Text Product Name AssociatedControlID txtName Runat server asp TextBox id txtName From the Library of Wow eBook Creating Templated Controls 1665 Text Bind Name Runat server br br asp Label id lblPrice Text Product Price AssociatedControlID txtPrice Runat server asp TextBox id txtPrice Text Bind Price Runat server br br asp Button id btnUpdate Text Update Runat server EditItemTemplate custom ProductForm hr New Product Name asp Label id lblName Runat server br br New Product Price asp Label id lblPrice Runat server div form body html In the Page_Load method in Listing the ProductForm Name and Price properties are set. Next the DataBind is called to cause the ProductForm control to evaluate its databinding expressions. The ProductForm control s EditItemTemplate includes Bind expressions instead of Eval expressions. You use Bind expressions in a two-way databinding template. From the Library of Wow eBook 1666 CHAPTER 37 Building Templated Databound Controls The EditItemTemplate includes a Button control. When you click the Button control the ProductForm control s OnBubbleEvent method executes the values are retrieved from the EditItemTemplate .

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.