开发者

Routing in ASP.NET MVC

I want to identify categories in my site in url not by id, but by its name开发者_如何转开发. When i'm adding category, which name contains "+" symbol - i have 404 error. This situation is on product internet server, when i'm deploying on local visual studio server - all work fine. Please, suggest me smth.

Example:

routes.MapRoute(

"Default",

"{controller}/{action}/{id}",

new { controller = "Home", action = "Catalog", id = "" }

);

http://wazy.ru/Catalog/Category/18+


Server wont throw 404 error when category names wrong. I think IIS cannot reach-invoke controller or action. Maybe this link help to figure out how to deploy.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜