I am working on a MVC site which are having two separate views for mobile and web. The background work is same. So I want to have same controller for both view.
Following is folder structure for that.
View -> Folder for view.
Customer -> This folder is for web
Index.cshtml -> Customer listing view for web
MobileCustomer-> This folder is for mobile
Index. cshtml -> Customer listing view for mobile.
Now the back ground things are same for both on the UI for both mobile and web are diffrerent. So I want to use same customer controller for that. So in Controller folder of asp.net mvc project. I have customer controller and I want to use that same.
But I want URL for each mobile are different.
localhost/customer/ -> This will load normal view for customer
localhost/mobile/customer -> This will load mobile view for customer
How I can achieve this with asp.net mvc 3 or 4 application?