ledgeJumper
ledgeJumper

Reputation: 3630

MVC3 with jQuery mobile, having different layout page and views

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

Answers (1)

ledgeJumper
ledgeJumper

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

Related Questions