user2935868
user2935868

Reputation: 11

Creating Dynamic Controllers in MVC3

I have a requirement like my controller name will be coming from database like below

http://www.mysite.com/ParkName

I'm using ASP.Net mvc3

I'm not getting any perfect solution how to route that dynamic controller or do in better way.

Could any one please Guide me.

Upvotes: 1

Views: 691

Answers (1)

Piotr Stapp
Piotr Stapp

Reputation: 19830

You can override DefaultControllerFactory to search controller type base on database name.

There is a simple example on Code Project

Upvotes: 1

Related Questions