Last post Jul 21, 2019 12:35 PM by JamberFX
Jul 19, 2019 10:26 PM|JamberFX|LINK
I have a site that I built using the vb.net web forms template in VS 2017. I would like to remove the detection of mobile devices and serving different web pages based on mobile or desktop.
I have tried following the suggestions on this site and others including:
Removing the Site.mobile.master, removing the viewswitcher.ascx file, etc.
None of the methods fully work. The one that come the closest to working is commenting out the line "RouteConfig.RegisterRoutes(RouteTable.Routes)" in the global.asax.vb file. That serves the right default page to all browsers and all pages correctly to
computer browsers but all other site pages are missing on mobile devices and I get "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable." instead.
Can anyone tell me the proper way to disable detecting mobile devices. It should be possible to just fix the code so that it just assumes all devices are non-mobile as a work around but I can't find where to do that.
Jul 21, 2019 12:35 PM|JamberFX|LINK
I worked on this for quite some time and concluded that the mobile detection was too ingrained in the template to efficiently root it out. I solved the problem by simply making the site.mobile.master a carbon copy of the site.master file. This forces the
browser to display the same content regardless of whether it is a mobile or desktop browser.