如果路径为:http://localhost:2317/food/1,这时用Request["id"]是取不到值的应该用:
Request.RequestContext.RouteData.Values["id"]
Powered by: 博客园 Copyright © 2024 billpeng Powered by .NET 8.0 on Kubernetes