URGENT!! Custom Device Filter


    Sponsored Links


  • 1. launch emulator to browse mobile web app?
    How do I do this? Is it even possible? I understand the concept (right click .aspx in soln. explorer, click browse with..., add the browser you want and then set it to default.) The problem is, for the life of me, I can't figure out where to tell it to look for the exe's of the emulators that come with VS2003. I did find something in the C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\ConnectionManager\Bin folder, but when I try to run that, it give me an error message about "The CE Boot image could not be opened..." etc. So I think that is not what I am after, really. TIA, Gerald
  • 2. Mobile Web Forms and CSS
    Hi, I am using Visual Studio.net 2003 to build a mobile web application. I haven't install Device Updated 2.0. Dows anyone know if I can use CSS in my mobile web forms? E.G. <mobile:Link id="Link2" cssclass="style1" runat="server" NavigateUrl="link"> Example of a mobile link control </mobile:Link> I've tried the above example but it doesn't seem to work. Also, can you use standard HTML elements like <a>, <p> etc. instead of mobile controls and apply CSS (cssClass)? Many thanks, eleni
  • 3. Static data for ObjectList
    Hi all, Is there a way to poulate an Object List with data that are embeded in the form itself (XML data). I do not want to populate it via code (codebehind). Thanks in advance, Greg.

URGENT!! Custom Device Filter

Postby Rui Barbosa » Wed, 29 Sep 2004 10:21:20 GMT

i to all,
I'm getting this error that i can't figure it out and i'm going crazy...

I'm trying to create a device filter using a custom filter type...
I'm doing everything by the book but i can't get rid of the error below.

Can anyone help...

The content of the Web.Config deviceFilter section tag is as follows
<filter name="isJPhone" compare="Type" argument="J-Phone" />
<filter name="isHTML32" compare="PreferredRenderingType" argument="html32"
<filter name="isWML11" compare="PreferredRenderingType" argument="wml11" />
<filter name="isCHTML10" compare="PreferredRenderingType" argument="chtml10"
<filter name="isGoAmerica" compare="Browser" argument="Go.Web" />
<filter name="isMME" compare="Browser" argument="Microsoft Mobile Explorer"
<filter name="isMyPalm" compare="Browser" argument="MyPalm" />
<filter name="isPocketIE" compare="Browser" argument="Pocket IE" />
<filter name="isUP3x" compare="Type" argument="Phone.com 3.x Browser" />
<filter name="isUP4x" compare="Type" argument="Phone.com 4.x Browser" />
<filter name="isEricssonR380" compare="Type" argument="Ericsson R380" />
<filter name="isNokia7110" compare="Type" argument="Nokia 7110" />
<filter name="prefersGIF" compare="PreferredImageMIME" argument="image/gif"
<filter name="prefersWBMP" compare="PreferredImageMIME"
argument="image/vnd.wap.wbmp" />
<filter name="supportsColor" compare="IsColor" argument="true" />
<filter name="supportsCookies" compare="Cookies" argument="true" />
<filter name="supportsJavaScript" compare="Javascript" argument="true" />
<filter name="supportsVoiceCalls" compare="CanInitiateVoiceCall"
argument="true" />
<filter name="isWML" type="MyWeb.DeviceFilters.ExtendedFilters,
MyWeb.Controls.dll" method="IsWML" />

The error i get is:

Can find neither a device capability named 'isHTML32' nor a public
non-static method on the page named 'isHTML32' that returns a System.Boolean
and takes System.Web.Mobile.MobileCapabilities and System.String as
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.ArgumentException: Can find neither a device
capability named 'isHTML32' nor a public non-static method on the page named
'isHTML32' that returns a System.Boolean and takes
System.Web.Mobile.MobileCapabilities and System.String as arguments.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentException: Can find neither a device capability named 'isHTML32'
nor a public non-static method on the page named 'isHTML32' that returns a
System.Boolean and takes System.Web.Mobile.MobileCapabilities and
System.String as arguments.]

s capabilities) +188
System.Web.UI.MobileControls.DeviceSpecific.get_SelectedChoice() +212
System.Web.UI.MobileControls.MobileControl.ApplyDeviceSpecifics() +19
System.Web.UI.MobileControls.MobileControl.OnInit(EventArgs e) +60

Similar Threads:

1.Device Filters

2.Hrlp with Mobile Device Filters

I am developing a Wap Site and i have problems using the 
mobile filters.
When i want to ask for mobilecapabilities i can get info 
about model or type or browser.
But this Info is accesible via Httpheader User-Agent and 
it comes like this "Nokia3560/1.0 (02.09) Profile/MIDP-1.0 
I want to know if this is a problem of my gateway or a 
configuration Issue of my mobileApp.
I need to know wich device is connecting to my app so i 
can customize my page for it.
Please give a hand on this one

3.URGENT: Filtering for EzWAP browser

Hi All,

I am writing a mobile web application using MIT and ASP.Net.  I need to
filter if the browser is EzWAP, i tried to get the Request.Browser.Type to
get the name or anything i got "Unknown", i tried to use the UserAgent, but
there are no preset filters that compare useragents.  Is there a way to do
it without having to write my own assembly dll?


4.Device Specific filter not working.


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">
                  <asp:TextBox id="txtReport" runat="server" 
TextMode="MultiLine" Rows="5" Wrapping="Wrap"/>
                  <mobile:TextView ID="txtReport" Runat="server" 

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.

5.Help - Unrecognized tag prefix or device filter 'asp' and other weird errors in aspx file


I have two weird problems here. I have a master page file that works 
absolutely fine. When I load it up in VWD, I get a couple of weird (to 
me) errors.

First, I get the error "Unrecognized tag prefix or device filter 'asp'" 
on the third line shown below...

<head runat="server">
<asp:contentplaceholder id="cphHeadStuff" runat="server" />

This is the first asp tag in the file. If I add another server tag in 
the <head> section, I get the same error. I don't get any such error on 
the server tags in the <body> of the master page.

Second, I get an error on the following bit of code (which is in the 

<asp:PlaceHolder ID="plcSearch" RunAt="server"> <asp:TextBox 
ID="txtFind" Columns="20" cssClass="box" MaxLength="30" RunAt="server" 
/> <asp:Button ID="btnFind" OnClick="btnFind_Click" Text="Find" 
cssClass="button" RunAt="server" /></p>

VWD gives the error "Cannot switch views: Validation (ASP.Net): Element 
'PlaceHolder' is missing its closing tag" on the opening tag, and 
"Cannot switch views: This end tag has no matching start tag" on the 
closing tag.

Anyone any idea what causes these two errors, and how to get rid of 
them? As I said, the page works fine, it compiles, I can add content to 
the contentplaceholder in the <head> and manipulate the placeholder in 
the <body>. VWD just doesn't like them.


Alan Silver
(anything added below this line is nothing to do with me)

6. Unrecognized tag prefix or device filter 'asp'

7. Problems creating head section - Unrecognized tag prefix or device filter 'asp'

8. 'asp' is an unrecognized tag prefix or device filter

Return to ASP.NET


Who is online

Users browsing this forum: No registered users and 65 guest