Auto-detect mobile device and set master page accordingly
<script runat="server">
protected void Page_PreInit(object sender, EventArgs e)
{
if (Request.Browser.IsMobileDevice)
MasterPageFile = "~/Views/Shared/Site.tablet.Master";
}
</script>
Labels: nerd, note to self
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home