Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Giới thiệu
Đăng ký
Đăng nhập
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
ASP.NET 4 Unleased - p 35
Đang chuẩn bị liên kết để tải về tài liệu:
ASP.NET 4 Unleased - p 35
Thiện Tiên
113
10
pdf
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
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
crossorigin="anonymous">
Đã 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.