Last post Apr 05, 2017 05:43 AM by Eric Du
Apr 04, 2017 03:35 PM|JAYHAWKER|LINK
I want to set my mobile to run as a normaly desktop. I can click the viewswitcher between the two, but how do I control it programmably?
Something like this.
public partial class Site_Mobile : System.Web.UI.MasterPage
protected void Page_Load(object sender, EventArgs e)
ViewSwitcher.Value = "desktop";
Apr 05, 2017 05:43 AM|Eric Du|LINK
According to your description, as far as I know, you want to show different viewers of the page based on the type of device. You could use IsMobileView method to detect the device is mobile device or PC device from HttpContext. For more details, please refer
to the following tutorials:
How To: Add Mobile Pages to Your ASP.NET Web Forms / MVC Application: