ASP.NET MVC路径ID以句 [英] ASP.NET MVC Route IDs with a period

查看:100
本文介绍了ASP.NET MVC路径ID以句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我有以下路线:

{controller}/{action}/{id}

我看看下面的网址:

I look at the following URL:

c1/a1/abc.

这是行不通的。
这只有在周期是在URL结束时会发生。
什么办法让ASP.NET MVC认识到,作为ID的一部分?

It doesn't work. This only happens when the period is at the end of the URL. Any way to get ASP.NET MVC to recognize that as part of the ID?

推荐答案

通过回答以下两个类似的问题阅读,我只能建议你带code期间将它传递给你的MVC应用程序之前。看起来,期间也作为delimter以规则为succh/处理。

Reading through the answers to the two similar problems below, I only can suggest that you encode the period before passing it to you MVC application. It looks as the period is also treated as a delimter to a rule succh as "/".

类似的问题在这里:

这篇关于ASP.NET MVC路径ID以句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆