Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 05, 2012 11:59 AM by roopeshreddy
Nov 05, 2012 12:38 AM|LINK
I just read the good article from this link which explain how we can detect mobile device in order to redirect user towards the appropriate website version :
But my problem is the following :
My existing app is for desktop and i use a default starting page (Default.aspx) and a master page. So, i plan to design a mobile version but without using of course this master page.
My default starting page is :
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" title="Page sans titre" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<% Call WriteMagazineTitle()%>
My question is : Where i have to put the detection code ? into my default.aspx or into my MasterPage.master.aspx ?
Thank's in advance
Nov 05, 2012 12:40 AM|LINK
If it's something you want to check on every request, then look into writing an http module (or handling BeginRequest in global.asax).
Nov 05, 2012 03:14 AM|LINK
You can also handle it in Session_Start event of Global.asax file!
Hope it helps u...
Nov 05, 2012 09:05 AM|LINK
Thank you for your help.
I have another question about the location of Meta Tags i must put in header section
<meta name="HandheldFriendly" content="true" />
<meta name="viewport" content="width=device-width" />
The problem is that global.asax is not a aspx page, so there is not header section.
Therefore, in wich page can i put theses Meta TAGs?
Last question : Is there any method to simulate the using of a mobile device to test before deploy my app?
Thanks in advance
Nov 05, 2012 11:59 AM|LINK
You can put these META tags in the Master Page! If no master page, then you may have to put these tags in all the pages!
Regarding Simulators -