File path as MVC route argument

≡放荡痞女 提交于 2019-11-28 10:50:30

A route like

"Files/{*path}"

will get the path as a single string. The * designates it as a wildcard mapping and it will consume the whole URL after "Files/".

For more information on ASP.NET's Routing feature, please see MSDN:

http://msdn.microsoft.com/en-us/library/cc668201.aspx

And for the "catch-all" parameters you want to use, see the section under "Handling a Variable Number of Segments".

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!