Đang chuẩn bị liên kết để tải về tài liệu:
ASP.NET 4 Unleased - p 35

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Creating Custom Controls with User Controls AssociatedControlID=”txtCity” Runat=”server” / | 314 CHAPTER 7 Creating Custom Controls with User Controls AssociatedControlID txtCity Runat server div div class addressField asp TextBox ID txtCity Runat server asp RequiredFieldValidator ID reqCity Text required ControlToValidate txtCity Runat server div br class clear div class addressLabel asp Label ID lblState Text State AssociatedControlID txtState Runat server div div class addressField asp TextBox ID txtState Runat server asp RequiredFieldValidator ID reqState Text required ControlToValidate txtState Runat server div br class clear div class addressLabel asp Label ID lblPostalCode Text Postal Code AssociatedControlID txtPostalCode Runat server div div class addressField asp TextBox ID txtPostalCode From the Library of Wow eBook Creating User Controls 315 Runat server asp RequiredFieldValidator ID RequiredFieldValidator1 Text required ControlToValidate txtPostalCode Runat server div br class clear fieldset The AddressForm control contains form controls for entering your street city state and postal code. Each of these fields is validated by a RequiredFieldValidator control. Finally the AddressForm includes a Label that can provide a title for the control. The AddressForm exposes all its form fields with properties. The control includes public Street City State and PostalCode property which you can read from the containing page. The page in Listing 7.11 illustrates how you can use the AddressForm control in a page. LISTING 7.11 Checkout.aspx @ Page Language C @ Register TagPrefix user TagName AddressForm Src AddressForm.ascx DOCTYPE html PUBLIC - W3C DTD XHTML 1.1 EN http www.w3.org TR xhtml11 DTD xhtml11.dtd script runat server protected void btnSubmit_Click object sender EventArgs e Show Billing Address Form Results ltlResults.Text br Billing Street AddressForm1.Street ltlResults.Text br Billing City AddressForm1.City ltlResults.Text br Billing State AddressForm1.State ltlResults.Text br Billing Postal Code AddressForm1.PostalCode ltlResults.Text br br 7 .

TÀI LIỆU 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.