MVC 4 iframe embedded in desktop page showing mobile view

Posted by Reto Laemmler on Stack Overflow See other posts from Stack Overflow or by Reto Laemmler
Published on 2012-04-14T23:23:21Z Indexed on 2012/04/14 23:30 UTC
Read the original article Hit count: 238

Filed under:
|
|
|

I use Index.cshtml and Index.mobile.cshtml. My Index.cshtml is a mobile app landing page containing an iframe to live demo the mobile web app. Index.mobile.cshtml is the mobile web app itself.

The problem is, the iframe keeps loading the desktop version itself. As far as I know, I cannot configure the user agent of the iframe to a mobile type. It should be solvable with some routing but I couldn't figure out how!?

© Stack Overflow or respective owner

Related posts about iframe

Related posts about redirect