TAILIEUCHUNG - Microsoft ASP .NET Fast & Easy Web Development phần 4

Sự thay đổi này sẽ đảm bảo rằng khi hình thành được điều hành, kiểm soát sẽ mặt nạ ký tự được gõ vào nó. 13. Kéo một điều khiển Button từ hộp công cụ để hình thành và thay đổi ID của nó và các đặc tính văn bản để btnSubmit và Submit, tương ứng. | error message that is displayed depending upon the width of the form. Finally the ErrorMessage property specifies the error message that is displayed if a control is not validated successfully. 4. Repeat steps 1-3 to add another RequiredFieldValidator control for validating the txtDescription control. 5. Add a RegularExpression Validator control to validate the txtURL control. 6. Change the ControlTo Validate Display and ErrorMessage properties to txtURL Dynamic and Specify a Valid URL respectively. 7. For the RegularExpression Validator control you also need to specify the validation expression. Click on the ValidationExpression property. An Ellipsis button will appear next to the ValidationExpression property. 8. Click on the Ellipsis button. The Regular Expression Editor dialog box will open. 9. Click on the Internet URL option in the Standard Expressions list. The option will be selected. 10. Click on OK. An expression that corresponds to an Internet URL will be added to the ValidationExpression property. Tip Often users do not include the http prefix when specifying a URL. To accept a URL from the user without the http prefix you can change the ValidationExpression property from http w- . w- W- . to W- . W- W- . 11. You also need to validate the optCategory documentation attachments and picture controls. Drag the CustomValidator control from the Toolbox to the form. 12. Change the ID property of the control to ValidateCategory. Change the Display property to Dynamic and change the ErrorMessage property to Select a Category. Note You do not need to specify a value for the ControlToValidate property of the CustomValidator control because you are declaring a custom script that Will be executed for the control. 13. Repeat steps 11 and 12 to add CustomValidator controls for the documentation attachments and picture controls. The IDs for the validation controls should be ValidateDoc ValidateAtt and ValidatePic respectively. For CustomValidator controls you need to .

TỪ KHÓA 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.