开发者

ASP.NET MVC Catch All

The ignore route is defined like this:

routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
开发者_JS百科

Why not

routes.IgnoreRoute("{resource}.axd/{*}");

What is the significance of pathInfo?

Thanks.


Exception will be thrown, route parameter must have name. The meaning of the * sign is explained here File path as MVC route argument


That's just to give the route parameter a name or an exception will be thrown. You could have called it {*foo}.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜