ASP.NET MVC 请求路径相关参数的获取

 

Request.ApplicationPath /
Request.CurrentExecutionFilePath /Home/Index
Request.FilePath /Home/Index
Request.Path /Home/Index
Request.PhysicalApplicationPath E:\VS_Project\WorkOrder\WorkOrder.Web\
Request.PhysicalPath E:\VS_Project\WorkOrder\WorkOrder.Web\Home\Index
Request.RawUrl /Home/Index?ID=0
Request.Url http://localhost:63287/Home/Index?ID=0
Request.Url.AbsolutePath /Home/Index
Request.Url.AbsoluteUri http://localhost:63287/Home/Index?ID=0
Request.Url.Scheme http
Request.Url.Host localhost
Request.Url.Port 63287
Request.Url.LocalPath /Home/Index
Request.Url.PathAndQuery /Home/Index?ID=0
Request.Url.Query ?ID=0
ViewContext.RouteData.Route.GetRouteData(this.Context).Values["controller"] Home
ViewContext.RouteData.Route.GetRouteData(this.Context).Values["action"] Index
posted @ 2016-10-26 10:44  小浩叔叔  阅读(2752)  评论(0编辑  收藏  举报