Is it possible to view the full version of your website from a mobile device? How can you load that up instead of the mobile version?
To provide the “full site” experience on a mobile device, the device’s browser cookies must store device information for the “Generic Device” group, (as opposed to a mobile device group).
The following method shows how to redirect a mobile device user to the default.aspx page (where the “full site” version of your website is located) when a button is clicked.
protected void ViewFullSite(object sender, EventArgs e) { // Set our Cookie to use Generic Device View if (Request.Cookies["ecm"] != null) { HttpCookie cookie = Request.Cookies["ecm"]; // Update our Cookie to be Generic Device Response.Cookies["ecm"]["dvcMdl"] = "Generic"; Response.Cookies["ecm"]["dvcOs"] = "Generic"; Response.Cookies["ecm"]["dvcResWidth"] = "800"; Response.Cookies["ecm"]["dvcResHeight"]= "600"; Response.Cookies["ecm"]["dvcImgWidth"] = "600"; Response.Cookies["ecm"]["dvcImgHeight"]= "600"; Page.Response.Redirect("/default.aspx"); } }
Looking for more information on Ektron's mobile templates? Here is our documentation.
Please sign in to leave a comment.