Url routing with database lookup?

后端 未结 4 672
孤街浪徒
孤街浪徒 2021-01-06 12:25

I want to build a ASP.NET MVC site so that the controller for a specific url is stored in the database instead of the URL.

The reason for that is that i\'m building

4条回答
  •  [愿得一人]
    2021-01-06 13:26

    Basically you'll have to implement your own IRouteHandler.

    Part of the answer and some example code is in Option 3 of this question's answer: ASP.NET MVC custom routing for search

    More information: http://weblogs.asp.net/fredriknormen/archive/2007/11/18/asp-net-mvc-framework-create-your-own-iroutehandler.aspx

提交回复
热议问题