随笔分类 -  ASP.NET MVC

MVC
摘要:Action的要求• 必须是一个公有方法• 必须返回ActionResult类型• 必须是实例方法• 不能是范型方法• 没有标注NonActionAttribute• 不能被重载(overload)Controller 提供了众多的方法让我们返回各种类型的 ActionResult。1. View最常用的一种,用于返回一个 "标准" 页面... 阅读全文
posted @ 2009-09-22 07:59 xumingming 阅读(3049) 评论(2) 推荐(0)
摘要:routes.MapRoute( "Default", "{controller}/{action}/{id}", new { action = "Index", id = "0" }, new { controller = @"^\w+", action = @"^\w+", id = @"^\d+" }); // Archive/2008-05-07 routes.MapRoute( "Blo... 阅读全文
posted @ 2009-09-21 07:27 xumingming 阅读(4129) 评论(0) 推荐(0)
摘要:传统ajax [代码]JQuery方法[代码]get and post[代码]控制ajax[代码]全局设置ajax[代码] 阅读全文
posted @ 2009-09-17 07:22 xumingming 阅读(1418) 评论(4) 推荐(2)