Posts

Showing posts from 2008

Bài 02: Models, Views và Controllers

Bài 02: Models, Views và Controllers Models, Views và Controller. Trong bài này b ạ n s ẽ có m ộ t cài nhìn tổng quát v ề models, views, controller c ủ a ASP.NET MVC framework. B ạ n s ẽ hi ể u s ự khác nhau gi ư a ASP.NET MVC v ớ i các Framework khác nh ư ASP.NET Webform ho ặ c ASP. URL Routing. M ộ t request t ừ browser s ẽ đ ượ c map t ớ i m ộ t controller, đ ặ c tính này c ủ a ASP.NET MVC g ọ i là URL Routing. Routing s ử dụng mộ t “bảng route” để “bắt” các request được gọi đến. Cái bảng này được khởi tạo ngay khi web app chạy lần đầu. Bản này được cài đặt trong file Global.asax. Mặc định của file này là: Global.asax using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Routing; namespace TaskList { // Note: For instructions on enabling IIS6 or IIS7 classic mode, // visit http://go.microsoft.com/?LinkId=9394801 public class MvcApplication :

Bài 01: Làm quen với ASP.NET MVC.

Image
Xin chào các bạn hôm nay mình xin phép giới thiệu với các bạn một "option" mới của những người làm web. Đó là Framework ASP.NET MVC - Nó cũng có cả năm nay rồi hiện tại nó đang là Beta. Tất cả các bài viết của mình đều lấy từ http://www.asp.net/learn/mvc/ OK! Băt đầu thôi. Chuẩn bị: * .NET 3.5 * OS của Microsoft (Vista, XP, Window2003, Window2008) * VS 2008 (Sorry nhé minh không có test trên 2005) * Download ASP.NET MVC từ http://www.asp.net/mvc/ chú ý: Minh chưa nói đến việc dùng MVC với IIS nhé. Trong bài này bạn đứng sợ một số code mà minh không hiểu ý nghĩa nhé sau này chúng ta sẽ "làm thịt nó". Xong rồi bây gời tạo một cái Projects và đặt tên nó là gi tùy thích mình đặt tên theo nguyên gốc là "TaskList" Bạn không cần phải tao Project test làm gì cái này thuộc về một lĩnh vực khác không cần quan tâm bây giờ Tạo Controller . Điển hình trong ASP.NET MVC là bạn sẽ băt đầu xây dựng một Controller khi xây dựng một ứng dụng. Bằng cách chọn phải chuột vào &qu

AD Utility

Image
Introduction When it comes to programmatically accessing Microsoft's Active Directory a lot of people seem to have quite a difficult time tying all the pieces together to accomplish exactly what they want to. There are so many technologies available for communicating with LDAP that many programmers end up with a mix between COM+ ADSI calls and .NET class calls mixed into their code. ADSI code is so difficult to understand and follow that the creator of that code usually owns it for the entirety of it's lifecycle since no one else wants to support it. This article attempts to tie together the most commonly used elements involved in Active Directory Management in the simplest, most clean manner possible. I interact with Active Directory in nearly all of my applications (web & forms) and I have had to solve a lot of integration issues for many customers. When I was starting out with this technology I had a lot of growing pains so this is an attempt to help those programmer