Routing routes.MapRoute("Test",
"{controller}/{action}/{Name}--{Age}",
new { controller = "Test", action = "Index", Name = "Liu", Age =25 });
Controller public ActionResult Index(string Name, string Age)
{ return View(new { Name = "hellow" });
}
我访问:http://localhost:2336/Test/Index/Liu--25为什么Action里面的两个参数接收不到值呢??
"{controller}/{action}/{Name}--{Age}",
new { controller = "Test", action = "Index", Name = "Liu", Age =25 });
Controller public ActionResult Index(string Name, string Age)
{ return View(new { Name = "hellow" });
}
我访问:http://localhost:2336/Test/Index/Liu--25为什么Action里面的两个参数接收不到值呢??
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货