【发布时间】:2011-08-30 23:51:36
【问题描述】:
我当前的网址是这样的 => http://localhost:4330/Restaurants/?Location=Manchester&Cuisine=0&NetProfit=0&Turnover=0&MaxPrice=120000&SortPriceBy=Low&Page=0
我希望它做出这样的东西 => http://localhost:4330/Restaurants/Manchester/?Cuisine=Chinese&MaxPrice=120000
其中不包含值 (0) 的 Param 查询字符串不会包含在查询字符串 URL 中 有可能吗?
【问题讨论】:
-
如果你想隐藏某些参数不显示为查询字符串,那么你可以通过其他方法传递它们,即表单值。
标签: asp.net asp.net-mvc url url-routing