Bài đăng

Đang hiển thị bài đăng từ Tháng 7, 2014

TRANG THAM KHẢO: http://nice-tutorials.blogspot.com/

Trang web tham khảo:  http://nice-tutorials.blogspot.com/

Limit the Number of Characters in a Textarea or Text Field

THAM KHẢO TRÊN:  http://www.mediacollege.com/internet/javascript/form/limit-characters.html This script allows you to set a limit on the number of characters a user can enter into a textarea or text field, like so: (Maximum characters: 100) You have   characters left. Step 1 - Create Function Insert the following code into the page head: <script language="javascript" type="text/javascript"> function limitText(limitField, limitCount, limitNum) { if (limitField.value.length > limitNum) { limitField.value = limitField.value.substring(0, limitNum); } else { limitCount.value = limitNum - limitField.value.length; } } </script> Step 2 - Create Text Area Use the following code to create the form and text area (if necessary, change the name of the form and text area to suit your needs): <form name="myform"> <textarea name="limitedtextarea" onKeyDown="limitText(this.form.limitedtextarea,this.form.countd

Debug visually with Code Map debugger integration

Link gốc: http://s.ch9.ms/Series/Visual-Studio-2012-Premium-and-Ultimate-Overview/Visual-Studio-Ultimate-2012Debug-visually-with-Code-Map-debugger-integration

Controller và Actions trong ứng dụng ASP.NET MVC theo http://jou.vn

Bài viết đầu tiên của chương thứ II sẽ giới thiệu với bạn về controller và action trong ứng dụng ASP.NET MVC. Nền tảng ASP.NET MVC ánh xạ các URL đến các lớp được gọi là controller. Các controller được dùng để xử lý các request gọi đến, quản lý dữ liệu được nhập bởi người dùng, tương tác, và thực thi logic ứng dụng hợp lý. Một lớp controller thường gọi các view để sinh ra mã HTML trả về cho request. Lớp cơ bản nhất được các controller kế thừa có tên là ControllerBase, lớp này cung cấp các mã quản lý mô hình MVC chung nhất. Lớp Controller được kế thừa từ ControllerBase, và là lớp mặc định dùng cho việc cài đặt controller. Lớp Controller có trách nhiệm: TÌm kiếm action thích hợp để gọi và kiểm ra xem thử action đó có thể gọi được hay không. Lấy các giá trị được gởi lên từ request để sử dụng như là tham số cho các action Xử lý tất cả các lỗi có thể xảy ra trong suốt quá trình thực thi phương thức ac