Khi tạo một Project ASP.NET MVC ta có được file Global.asax. Mình biết sơ qua thì nó làm nhiệm vụ xử lý URL để đưa đến một class Controller tương ứng. Không biết hiểu như thế có đúng ko? Và đọc ko hiểu lắm [IMG]images/smilies/offline.gif[/IMG]
Đoạn code trong file đó mặc định như sau:
Mã:
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;using System.Web.Routing; namespace MyMVCApplication{ // Note: For instructions on enabling IIS6 or IIS7 classic mode, // visit http://go.microsoft.com/?LinkId=9394801 public class MvcApplication : System.Web.HttpApplication { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults ); } protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RegisterRoutes(RouteTable.Routes); } }}
Bạn nào đã từng thao tác hoặc hiểu file này thì giải thích giúp mình bằng cách comment vào các dòng code. Mình cảm ơn!
Pallet nhựa Long An đã trở thành một trong những lựa chọn phổ biến cho nhu cầu vận chuyển và lưu trữ hàng hóa trong nhiều ngành công nghiệp. Với đặc tính nhẹ nhàng, chắc chắn và dễ vận chuyển, các...
Thanh lý pallet nhựa Long An giá rẻ