Reputation: 3630
I thought what I am trying to do what already built in, but it does not seem to be working. From what I understood, with asp.net MVC you can name your views like this:
_view.cshtml
_view.Mobile.cshtml
and it would use the mobile one if coming from a mobile device, and use the non-mobile one on desktops.
It is not automatically doing this for me, is there something else I need to do? I have all the jquery mobile scripts and css referenced.
Upvotes: 0
Views: 287
Reputation: 3630
As pointed out in the comments, this tutorial: asp.net/mvc/tutorials/mvc-4/aspnet-mvc-4-mobile-features is a great way to go.
My particular problem what I did not have anything in the default Shared view folder, so it was not routing correctly.
Upvotes: 1