06 2011 档案
摘要:今天刚发现在Web Application 下也可以使用MVC中的Route功能,额,好吧,我out了。以后可以像mvc中那样使用Route,可以不用Url Rewriting了.1.添加Global.asax,添加并注册路由,具体代码如下: 记得加入System.Web.Routing引用。protected void Application_Start(object sender, EventArgs e) { RegisterRoutes(RouteTable.Routes); }private void RegisterRoutes(RouteCollection routes) {
阅读全文

浙公网安备 33010602011771号