DeviceSpecific "isPocketIE" not working on PPC 2003 Emulator

Discussion in 'ASP .Net Mobile' started by Justin Roberts, Oct 31, 2007.

  1. Hi

    I am developing a mobile web VB asp.net application in VS 2005. The forms
    are mobile web forms. I have a mobile web configuration page (web.config).
    In one of my forms I have a DeviceSpecific control so that I can choose to
    use an asp:TextBox when PocketIE is detected, otherwise I want to use a
    mobile:TextView control.

    Here is a snippet of my asp code:

    <mobile:panel ID="pnlReport" Runat="server" Font-Name="Arial"
    Font-Size="Small" Paginate="True">
    <mobile:DeviceSpecific id="DeviceSpecificEdit" runat="server">
    <Choice Filter="isPocketIE">
    <ContentTemplate>
    <asp:TextBox id="txtReport" runat="server"
    TextMode="MultiLine" Rows="5" Wrapping="Wrap"/>
    </ContentTemplate>
    </Choice>
    <Choice>
    <ContentTemplate>
    <mobile:TextView ID="txtReport" Runat="server"
    Wrapping="Wrap">
    </mobile:TextView>
    </ContentTemplate>
    </Choice>
    </mobile:DeviceSpecific>
    </mobile:panel>

    Unfortunately the Device Specific filter never works on the Pocket PC 2003
    SE Emulator that ships with VS2005. The asp.net code always runs the default
    choice. I have discovered that the Internet explorer on Pocket PC seems to
    return a MobileCapabilities browser type of "MSIE".

    I have looked everywhere for examples and cannot see anything I have done
    wrong. How do I ensure that PocketPc 2003 will run the "isPocketIE" device
    code and not always choose the default choice?

    I should note that my web.config file contains amongst it's device filters:
    <filter name="isPocketIE" compare="Browser" argument="Pocket IE" />

    Has anyone come across this before and discovered what to do. Any help would
    be much appreciated.
    Thank you.
    Regards
    Justin.
    Justin Roberts, Oct 31, 2007
    #1
    1. Advertising

  2. Justin Roberts

    Steveo Guest

    Hi,
    Have you been working from some reference guide on how to set up
    DeviceFilters, to know that you're compareing the right value with the right
    argument?

    "Justin Roberts" wrote:

    > Hi
    >
    > I am developing a mobile web VB asp.net application in VS 2005. The forms
    > are mobile web forms. I have a mobile web configuration page (web.config).
    > In one of my forms I have a DeviceSpecific control so that I can choose to
    > use an asp:TextBox when PocketIE is detected, otherwise I want to use a
    > mobile:TextView control.
    >
    > Here is a snippet of my asp code:
    >
    > <mobile:panel ID="pnlReport" Runat="server" Font-Name="Arial"
    > Font-Size="Small" Paginate="True">
    > <mobile:DeviceSpecific id="DeviceSpecificEdit" runat="server">
    > <Choice Filter="isPocketIE">
    > <ContentTemplate>
    > <asp:TextBox id="txtReport" runat="server"
    > TextMode="MultiLine" Rows="5" Wrapping="Wrap"/>
    > </ContentTemplate>
    > </Choice>
    > <Choice>
    > <ContentTemplate>
    > <mobile:TextView ID="txtReport" Runat="server"
    > Wrapping="Wrap">
    > </mobile:TextView>
    > </ContentTemplate>
    > </Choice>
    > </mobile:DeviceSpecific>
    > </mobile:panel>
    >
    > Unfortunately the Device Specific filter never works on the Pocket PC 2003
    > SE Emulator that ships with VS2005. The asp.net code always runs the default
    > choice. I have discovered that the Internet explorer on Pocket PC seems to
    > return a MobileCapabilities browser type of "MSIE".
    >
    > I have looked everywhere for examples and cannot see anything I have done
    > wrong. How do I ensure that PocketPc 2003 will run the "isPocketIE" device
    > code and not always choose the default choice?
    >
    > I should note that my web.config file contains amongst it's device filters:
    > <filter name="isPocketIE" compare="Browser" argument="Pocket IE" />
    >
    > Has anyone come across this before and discovered what to do. Any help would
    > be much appreciated.
    > Thank you.
    > Regards
    > Justin.
    Steveo, Nov 12, 2007
    #2
    1. Advertising

  3. Hi

    Thanks for the reply.

    I'm a bit confused by what you mean. As soon as you place a device specific
    component on a form, the asp.net code is filled in for you. The template
    allows you to select which values you want and the Microsoft control handles
    the rest. I don't actually need to match any values with arguments manually.
    But just in case, I've tried it both ways... manual and automatic. No joy.

    As for reference guides, well there are samples all over the net and also in
    the MSDN itself.

    Regards
    Justin.
    Justin Roberts, Nov 13, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. summer00
    Replies:
    0
    Views:
    632
    summer00
    Mar 10, 2005
  2. Russ
    Replies:
    2
    Views:
    143
    Lewis Wang [MSFT]
    Aug 20, 2003
  3. Vinita Sharma
    Replies:
    2
    Views:
    206
    Rick Spiewak
    Aug 11, 2004
  4. Isaac C.

    PPC Emulator, Pocket IE, Browser Capabilities

    Isaac C., Sep 5, 2004, in forum: ASP .Net Mobile
    Replies:
    2
    Views:
    186
    Yan-Hong Huang[MSFT]
    Sep 8, 2004
  5. Justin Roberts

    DeviceSpecific filter "isPocketIE" does not work

    Justin Roberts, Oct 31, 2007, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    105
    Justin Roberts
    Oct 31, 2007
Loading...

Share This Page