ASP.NET MVC: url routing vs querystring

后端 未结 3 1505
春和景丽
春和景丽 2020-12-07 21:11

I have a page routed like /Comments/Search/3 where i search and display all the comments of the thread \"3\".

I\'m adding a sort function (by date, auth

3条回答
  •  暖寄归人
    2020-12-07 21:40

    Your best bet is to add a routing rule to handle it. There's a handy article on it here:

    http://aspalliance.com/1525_ASPNET_MVC_Framework_Part_2_URL_Routing.2

    Then your URL would read /Comments/Search/3/Sort/Author

提交回复
热议问题