I have got .cshtml and .Mobile.cshtml for all of my views. Is there a way to disable .Mobile.cshtml on certain controllers? For such controllers, I always want to use the normal views instead of mobile views.
Thanks!!
Sorry for sounding stupid. But if you always want to use a normal view, just remove the mobile view from the project.
Edit
To force the browser to load the desktop view on a mobile device you will need to use the BrowserHelper SetOverriddenBrowser
Within your action method you could do something like this
HttpContext.SetOverriddenBrowser(BrowserOverride.Desktop);
Try this link for more help http://blog.mirajavora.com/overriding-browser-capabilities-in-asp.net
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With